Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .github/workflows/docs-deploy-surge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
- completed

jobs:
publish-docs:
deploy-docs:
# Uncomment this if statement to deploy only when the PR builds cleanly
# if: github.event.workflow_run.conclusion == 'success'

Expand Down Expand Up @@ -63,11 +63,6 @@ jobs:
- id: unzip-docs
run: unzip docs.zip

- id: get-top-dir
run: |
root=$(ls -d */index.html | sed -r 's/(.*)\/index\.html/\1/')
echo "top-dir=$root" >> $GITHUB_OUTPUT

- id: unzip-changelog
if: ${{ hashFiles('changelog.zip') != '' }}
run: unzip changelog.zip
Expand Down Expand Up @@ -97,13 +92,13 @@ jobs:
SITE_DIR: ${{ steps.get-top-dir.outputs.top-dir }}
run: |
npm install -g surge
surge ./$SITE_DIR $DEPLOY_URL --token "$SURGE_TOKEN"
surge . $DEPLOY_URL --token "$SURGE_TOKEN"

# If the PR artifacts include a changelog file, add it to the PR as a comment
# The changelog contains links to new and changed files in the deployed docs
- name: Comment on PR (changelog)
if: ${{ hashFiles('changelog') != '' }}
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 #v2.9.0
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 #v2
with:
number: ${{ steps.get-deploy-id.outputs.deploy-id }}
recreate: true
Expand All @@ -116,7 +111,7 @@ jobs:
if: ${{ hashFiles('changelog') == '' }}
env:
DEPLOY_URL: ${{ steps.get-deploy-url.outputs.deploy-url }}
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 #v2.9.0
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 #v2
with:
number: ${{ steps.get-deploy-id.outputs.deploy-id }}
header: docs-pr-changes
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/docs-pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@ jobs:

# Generate HTML
docs-build-pr:
uses: neo4j/docs-tools/.github/workflows/reusable-docs-build.yml@v1.2.0
uses: neo4j/docs-tools/.github/workflows/reusable-docs-build.yml@v2
with:
deploy-id: ${{ github.event.number }}
retain-artifacts: 14

# Parse the json log output from the HTML build, and output warnings and errors as annotations
# Optionally, fail the build if there are warnings or errors
# By default, the job fails if there are errors, passes if there are warnings only.
docs-verify-pr:
needs: docs-build-pr
uses: neo4j/docs-tools/.github/workflows/reusable-docs-verify.yml@v1.2.0
uses: neo4j/docs-tools/.github/workflows/reusable-docs-verify.yml@v2
with:
failOnWarnings: true

Expand Down Expand Up @@ -55,7 +54,7 @@ jobs:
docs-updates-comment-pr:
if: needs.docs-build-pr.outputs.pages-listed == 'success'
needs: [docs-build-pr, docs-changes-pr]
uses: neo4j/docs-tools/.github/workflows/reusable-docs-pr-changes.yml@v1.2.0
uses: neo4j/docs-tools/.github/workflows/reusable-docs-pr-changes.yml@v2
with:
pages-modified: ${{ needs.docs-changes-pr.outputs.pages-modified }}
pages-added: ${{ needs.docs-changes-pr.outputs.pages-added }}
Loading