Skip to content

Commit 0d91957

Browse files
authored
Update workflows to v2 (#372)
1 parent 2b63c9d commit 0d91957

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:
@@ -17,18 +17,16 @@ jobs:
1717

1818
# Generate HTML
1919
docs-build:
20-
uses: neo4j/docs-tools/.github/workflows/reusable-docs-build.yml@v1.1.2
20+
uses: neo4j/docs-tools/.github/workflows/reusable-docs-build.yml@v2
2121
with:
22-
deploy-id: 0
23-
retain-artifacts: 28
24-
package-script: 'publish-verify'
22+
package-script: 'verify:publish'
2523

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

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

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

1211
jobs:
1312

1413
# Generate HTML
1514
docs-build-pr:
16-
uses: neo4j/docs-tools/.github/workflows/reusable-docs-build.yml@v1.2.0
15+
uses: neo4j/docs-tools/.github/workflows/reusable-docs-build.yml@v2
1716
with:
1817
deploy-id: ${{ github.event.number }}
19-
retain-artifacts: 14
2018

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

@@ -55,7 +53,7 @@ jobs:
5553
docs-updates-comment-pr:
5654
if: needs.docs-build-pr.outputs.pages-listed == 'success'
5755
needs: [docs-build-pr, docs-changes-pr]
58-
uses: neo4j/docs-tools/.github/workflows/reusable-docs-pr-changes.yml@v1.2.0
56+
uses: neo4j/docs-tools/.github/workflows/reusable-docs-pr-changes.yml@v2
5957
with:
6058
pages-modified: ${{ needs.docs-changes-pr.outputs.pages-modified }}
6159
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
@@ -6,8 +6,7 @@ on:
66
branches:
77
- "dev"
88
- "5.x"
9-
- "4.[0-9]"
10-
- "gqlstatus-errors"
9+
- "4.4"
1110
types:
1211
- closed
1312

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

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)