Skip to content

Commit 1d7d64d

Browse files
Update workflows to v2 (#372) (#383)
Co-authored-by: Neil Dewhurst <[email protected]>
1 parent f4b8216 commit 1d7d64d

File tree

7 files changed

+54
-28
lines changed

7 files changed

+54
-28
lines changed

.github/workflows/docs-deploy-surge.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
# The changelog contains links to new and changed files in the deployed docs
106106
- name: Comment on PR (changelog)
107107
if: ${{ hashFiles('changelog') != '' }}
108-
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 #v2.9.0
108+
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 #v2
109109
with:
110110
number: ${{ steps.get-deploy-id.outputs.deploy-id }}
111111
recreate: true
@@ -118,7 +118,7 @@ jobs:
118118
if: ${{ hashFiles('changelog') == '' }}
119119
env:
120120
DEPLOY_URL: ${{ steps.get-deploy-url.outputs.deploy-url }}
121-
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 #v2.9.0
121+
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 #v2
122122
with:
123123
number: ${{ steps.get-deploy-id.outputs.deploy-id }}
124124
header: docs-pr-changes

.github/workflows/docs-publish.yml renamed to .github/workflows/docs-generate-html.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
name: "Publish Branch"
2+
name: "Generate HTML for publishing"
33

44
on:
55
push:
@@ -18,18 +18,16 @@ jobs:
1818

1919
# Generate HTML
2020
docs-build:
21-
uses: neo4j/docs-tools/.github/workflows/reusable-docs-build.yml@v1.1.2
21+
uses: neo4j/docs-tools/.github/workflows/reusable-docs-build.yml@v2
2222
with:
23-
deploy-id: 0
24-
retain-artifacts: 28
25-
package-script: 'publish-verify'
23+
package-script: 'verify:publish'
2624

2725
# Parse the json log output from the HTML build, and output warnings and errors as annotations
2826
# Optionally, fail the build if there are warnings or errors
2927
# By default, the job fails if there are errors, passes if there are warnings only.
3028
docs-verify:
3129
needs: docs-build
32-
uses: neo4j/docs-tools/.github/workflows/reusable-docs-verify.yml@v1.1.2
30+
uses: neo4j/docs-tools/.github/workflows/reusable-docs-verify.yml@v2
3331
with:
3432
failOnWarnings: true
3533

.github/workflows/docs-pr-checks.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,22 @@ on:
77
- "dev"
88
- "main"
99
- "5.x"
10-
- "4.[0-9]"
11-
- "gqlstatus-errors"
10+
- "4.4"
1211

1312
jobs:
1413

1514
# Generate HTML
1615
docs-build-pr:
17-
uses: neo4j/docs-tools/.github/workflows/reusable-docs-build.yml@v1.2.0
16+
uses: neo4j/docs-tools/.github/workflows/reusable-docs-build.yml@v2
1817
with:
1918
deploy-id: ${{ github.event.number }}
20-
retain-artifacts: 14
2119

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

@@ -56,7 +54,7 @@ jobs:
5654
docs-updates-comment-pr:
5755
if: needs.docs-build-pr.outputs.pages-listed == 'success'
5856
needs: [docs-build-pr, docs-changes-pr]
59-
uses: neo4j/docs-tools/.github/workflows/reusable-docs-pr-changes.yml@v1.2.0
57+
uses: neo4j/docs-tools/.github/workflows/reusable-docs-pr-changes.yml@v2
6058
with:
6159
pages-modified: ${{ needs.docs-changes-pr.outputs.pages-modified }}
6260
pages-added: ${{ needs.docs-changes-pr.outputs.pages-added }}

.github/workflows/docs-teardown.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ on:
77
- "dev"
88
- "main"
99
- "5.x"
10-
- "4.[0-9]"
11-
- "gqlstatus-errors"
10+
- "4.4"
1211
types:
1312
- closed
1413

@@ -40,7 +39,7 @@ jobs:
4039
surge teardown $DEPLOY_URL --token "$SURGE_TOKEN"
4140
4241
- name: Comment on PR
43-
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 #v2.9.0
42+
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 #v2
4443
with:
4544
number: ${{ github.event.pull_request.number }}
4645
header: docs-pr-changes
@@ -49,4 +48,3 @@ jobs:
4948
5049
The preview documentation has now been torn down - reopening this PR will republish it.
5150
GITHUB_TOKEN: ${{ secrets.DOCS_PR_COMMENT_TOKEN }}
52-

package.json

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@
55
"main": "server.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
8-
"start": "nodemon -e adoc --exec \"npm run build && npm run serve\"",
8+
"prestart": "npm update",
9+
"start": "nodemon --exec \"npm run build\"",
910
"serve": "node server.js",
10-
"build": "antora --stacktrace preview.yml",
11-
"build-verify": "antora --stacktrace --fetch preview.yml --log-format=json --log-level=info --log-file ./build/log/log.json",
12-
"publish-verify": "antora --stacktrace --fetch publish.yml --log-format=json --log-level=info --log-file ./build/log/log.json"
11+
"clean": "rm -rf build",
12+
"build": "npm run build:preview",
13+
"postbuild": "node server.js",
14+
"build:preview": "antora preview.yml --stacktrace --log-format=pretty",
15+
"build:publish": "npm run clean && antora publish.yml --stacktrace --log-format=pretty",
16+
"verify:preview": "antora --stacktrace --fetch preview.yml --log-format=json --log-level=info --log-file ./build/log/log.json",
17+
"verify:publish": "antora --stacktrace --fetch publish.yml --log-format=json --log-level=info --log-file ./build/log/log.json"
1318
},
1419
"repository": {
1520
"type": "git",
@@ -23,14 +28,31 @@
2328
},
2429
"homepage": "https://github.com/neo4j/docs-status-codes#readme",
2530
"dependencies": {
26-
"antora": "^3.1.10",
27-
"@antora/site-generator-default": "^3.1.10",
28-
"@neo4j-antora/antora-table-footnotes": "^0.3.3",
31+
"antora": "^3.1.12",
32+
"@neo4j-antora/aliases-redirects": "^0.2.3",
33+
"@neo4j-antora/mark-terms": "1.1.0",
34+
"@neo4j-antora/roles-labels": "^0.1.1",
35+
"@neo4j-antora/selector-labels": "^0.1.1",
36+
"@neo4j-antora/table-footnotes": "^1.0.0",
37+
"@neo4j-antora/xref-hash-validator": "^0.1.3",
2938
"@neo4j-documentation/macros": "^1.0.4",
3039
"@neo4j-documentation/remote-include": "^1.0.0"
3140
},
3241
"devDependencies": {
33-
"express": "^5.0.1",
42+
"express": "^5.1.0",
3443
"nodemon": "^3.1.0"
44+
},
45+
"nodemonConfig": {
46+
"watch": [
47+
"**/modules/**",
48+
"**/antora.yml",
49+
"**/preview.yml",
50+
"**/publish.yml"
51+
],
52+
"ext": "yml,yaml,adoc,svg,png,jpg",
53+
"ignore": [
54+
"build",
55+
"node_modules"
56+
]
3557
}
3658
}

preview.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@ ui:
2121
urls:
2222
html_extension_style: indexify
2323

24+
antora:
25+
extensions:
26+
- "@neo4j-antora/roles-labels"
27+
- "@neo4j-antora/table-footnotes"
28+
- "@neo4j-antora/xref-hash-validator"
29+
2430
asciidoc:
2531
extensions:
2632
- "@neo4j-documentation/remote-include"
2733
- "@neo4j-documentation/macros"
28-
- "@neo4j-antora/antora-table-footnotes"
2934
attributes:
3035
page-theme: docs
3136
page-type: Docs

publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@ ui:
2121
urls:
2222
html_extension_style: indexify
2323

24+
antora:
25+
extensions:
26+
- "@neo4j-antora/roles-labels"
27+
- "@neo4j-antora/table-footnotes"
28+
- "@neo4j-antora/xref-hash-validator"
29+
2430
asciidoc:
2531
extensions:
2632
- "@neo4j-documentation/remote-include"
2733
- "@neo4j-documentation/macros"
28-
- "@neo4j-antora/antora-table-footnotes"
2934
attributes:
3035
page-theme: docs
3136
page-type: Docs

0 commit comments

Comments
 (0)