diff --git a/.github/workflows/docs-deploy-surge.yml b/.github/workflows/docs-deploy-surge.yml index 2399928e..632e9147 100644 --- a/.github/workflows/docs-deploy-surge.yml +++ b/.github/workflows/docs-deploy-surge.yml @@ -105,7 +105,7 @@ jobs: # 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 @@ -118,7 +118,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 diff --git a/.github/workflows/docs-publish.yml b/.github/workflows/docs-generate-html.yml similarity index 91% rename from .github/workflows/docs-publish.yml rename to .github/workflows/docs-generate-html.yml index 05f8621a..8eb5a7b3 100644 --- a/.github/workflows/docs-publish.yml +++ b/.github/workflows/docs-generate-html.yml @@ -1,5 +1,5 @@ -name: "Publish Branch" +name: "Generate HTML for publishing" on: push: @@ -18,18 +18,16 @@ jobs: # Generate HTML docs-build: - uses: neo4j/docs-tools/.github/workflows/reusable-docs-build.yml@v1.1.2 + uses: neo4j/docs-tools/.github/workflows/reusable-docs-build.yml@v2 with: - deploy-id: 0 - retain-artifacts: 28 - package-script: 'publish-verify' + package-script: 'verify:publish' # 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: needs: docs-build - uses: neo4j/docs-tools/.github/workflows/reusable-docs-verify.yml@v1.1.2 + uses: neo4j/docs-tools/.github/workflows/reusable-docs-verify.yml@v2 with: failOnWarnings: true diff --git a/.github/workflows/docs-pr-checks.yml b/.github/workflows/docs-pr-checks.yml index 5d30dc95..af7842db 100644 --- a/.github/workflows/docs-pr-checks.yml +++ b/.github/workflows/docs-pr-checks.yml @@ -7,24 +7,22 @@ on: - "dev" - "main" - "5.x" - - "4.[0-9]" - - "gqlstatus-errors" + - "4.4" 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 @@ -56,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 }} diff --git a/.github/workflows/docs-teardown.yml b/.github/workflows/docs-teardown.yml index 915ba712..facb6134 100644 --- a/.github/workflows/docs-teardown.yml +++ b/.github/workflows/docs-teardown.yml @@ -7,8 +7,7 @@ on: - "dev" - "main" - "5.x" - - "4.[0-9]" - - "gqlstatus-errors" + - "4.4" types: - closed @@ -40,7 +39,7 @@ jobs: surge teardown $DEPLOY_URL --token "$SURGE_TOKEN" - name: Comment on PR - uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 #v2.9.0 + uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 #v2 with: number: ${{ github.event.pull_request.number }} header: docs-pr-changes @@ -49,4 +48,3 @@ jobs: The preview documentation has now been torn down - reopening this PR will republish it. GITHUB_TOKEN: ${{ secrets.DOCS_PR_COMMENT_TOKEN }} - diff --git a/package.json b/package.json index 990c271d..1920440e 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,16 @@ "main": "server.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "start": "nodemon -e adoc --exec \"npm run build && npm run serve\"", + "prestart": "npm update", + "start": "nodemon --exec \"npm run build\"", "serve": "node server.js", - "build": "antora --stacktrace preview.yml", - "build-verify": "antora --stacktrace --fetch preview.yml --log-format=json --log-level=info --log-file ./build/log/log.json", - "publish-verify": "antora --stacktrace --fetch publish.yml --log-format=json --log-level=info --log-file ./build/log/log.json" + "clean": "rm -rf build", + "build": "npm run build:preview", + "postbuild": "node server.js", + "build:preview": "antora preview.yml --stacktrace --log-format=pretty", + "build:publish": "npm run clean && antora publish.yml --stacktrace --log-format=pretty", + "verify:preview": "antora --stacktrace --fetch preview.yml --log-format=json --log-level=info --log-file ./build/log/log.json", + "verify:publish": "antora --stacktrace --fetch publish.yml --log-format=json --log-level=info --log-file ./build/log/log.json" }, "repository": { "type": "git", @@ -23,14 +28,31 @@ }, "homepage": "https://github.com/neo4j/docs-status-codes#readme", "dependencies": { - "antora": "^3.1.10", - "@antora/site-generator-default": "^3.1.10", - "@neo4j-antora/antora-table-footnotes": "^0.3.3", + "antora": "^3.1.12", + "@neo4j-antora/aliases-redirects": "^0.2.3", + "@neo4j-antora/mark-terms": "1.1.0", + "@neo4j-antora/roles-labels": "^0.1.1", + "@neo4j-antora/selector-labels": "^0.1.1", + "@neo4j-antora/table-footnotes": "^1.0.0", + "@neo4j-antora/xref-hash-validator": "^0.1.3", "@neo4j-documentation/macros": "^1.0.4", "@neo4j-documentation/remote-include": "^1.0.0" }, "devDependencies": { - "express": "^5.0.1", + "express": "^5.1.0", "nodemon": "^3.1.0" + }, + "nodemonConfig": { + "watch": [ + "**/modules/**", + "**/antora.yml", + "**/preview.yml", + "**/publish.yml" + ], + "ext": "yml,yaml,adoc,svg,png,jpg", + "ignore": [ + "build", + "node_modules" + ] } } diff --git a/preview.yml b/preview.yml index e4a641c2..fdd8303f 100644 --- a/preview.yml +++ b/preview.yml @@ -21,11 +21,16 @@ ui: urls: html_extension_style: indexify +antora: + extensions: + - "@neo4j-antora/roles-labels" + - "@neo4j-antora/table-footnotes" + - "@neo4j-antora/xref-hash-validator" + asciidoc: extensions: - "@neo4j-documentation/remote-include" - "@neo4j-documentation/macros" - - "@neo4j-antora/antora-table-footnotes" attributes: page-theme: docs page-type: Docs diff --git a/publish.yml b/publish.yml index 87ea52ef..2eb43424 100644 --- a/publish.yml +++ b/publish.yml @@ -21,11 +21,16 @@ ui: urls: html_extension_style: indexify +antora: + extensions: + - "@neo4j-antora/roles-labels" + - "@neo4j-antora/table-footnotes" + - "@neo4j-antora/xref-hash-validator" + asciidoc: extensions: - "@neo4j-documentation/remote-include" - "@neo4j-documentation/macros" - - "@neo4j-antora/antora-table-footnotes" attributes: page-theme: docs page-type: Docs