Skip to content
Merged
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
52 changes: 0 additions & 52 deletions .github/workflows/docs-branch-checks.yml

This file was deleted.

88 changes: 88 additions & 0 deletions .github/workflows/docs-generate-html.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file isn't quite the same as the version in dev. You should be ok to just copy and paste the whole file from dev.

name: "Generate HTML"

# edit the list of branches according to your repository
# the list of branches should contain all the branches in your Antora publish playbooks
on:
push:
branches:
- 'dev'
- 'main'
- '5.x'
- '4.4'
workflow_dispatch:

# change `dev` and `main` according to your repository's branch names
# `dev` is the branch you use to build and publish to staging
# `main` is the branch you use to build and publish to neo4j.com/docs
# in some cases, PROD_BRANCH and DEV_BRANCH may be the same branch
env:
PROD_BRANCH: 'main'
DEV_BRANCH: 'dev'

jobs:

prepare-ref-env:
name: Set build branch and environments
runs-on: ubuntu-latest
outputs:
build-ref: ${{ steps.set-ref-env.outputs.build-ref }}
environments: ${{ steps.set-ref-env.outputs.environments }}
steps:
- name: Set Build Ref
id: set-ref-env
run: |
if [[ "${GITHUB_REF}" == "refs/heads/${{ env.DEV_BRANCH }}" ]]; then
build_from=${{ env.DEV_BRANCH }}
environments='["dev"]'
else
build_from=${{ env.PROD_BRANCH }}
environments='["prod"]'
fi
# if dev branch = prod branch publish to both
if [[ "${{ env.DEV_BRANCH }}" == "${{ env.PROD_BRANCH }}" ]]; then
environments='["dev","prod"]'
fi
echo "build-ref=${build_from}" >> $GITHUB_OUTPUT
echo "environments=${environments[@]}" >> $GITHUB_OUTPUT

docs-build:
name: Generate HTML
needs: prepare-ref-env
uses: neo4j/docs-tools/.github/workflows/reusable-docs-build.yml@v2
with:
package-script: 'verify:publish'
build-ref: ${{needs.prepare-ref-env.outputs.build-ref}}
fetch-depth: 0

docs-verify:
name: Verify HTML
needs: docs-build
uses: neo4j/docs-tools/.github/workflows/reusable-docs-verify.yml@v2
with:
failOnWarnings: true

publish-html:
name: Publish HTML
needs: [docs-verify, prepare-ref-env]
runs-on: ubuntu-latest

strategy:
matrix:
environments: ${{ fromJson(needs.prepare-ref-env.outputs.environments) }}

steps:
- name: Publish to ${{ matrix.environments }}
uses: peter-evans/repository-dispatch@bf47d102fdb849e755b0b0023ea3e81a44b6f570 # v2.1.2
with:
token: ${{ secrets.DOCS_DISPATCH_TOKEN }}
repository: neo4j/docs-publish
event-type: publish-html
client-payload: |-
{
"org": "${{ github.repository_owner }}",
"repo": "${{ github.event.repository.name }}",
"run_id": "${{ github.run_id }}",
"args": "--dryrun",
"publish_env": "${{ matrix.environments }}"
}
9 changes: 4 additions & 5 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 }}
pages-added: ${{ needs.docs-changes-pr.outputs.pages-added }}
46 changes: 29 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
{
"name": "docs-template",
"name": "docs-operations",
"version": "1.0.0",
"description": "Template repo for Neo4j documentation projects",
"description": "Neo4j Operations documentation",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "npm update && nodemon -e adoc --exec \"npm run build && npm run serve\"",
"prestart": "npm update",
"start": "nodemon --exec \"npm run build\"",
"serve": "node server.js",
"adoc-gen": "node scripts/adoc-gen.js",
"build": "antora preview.yml --stacktrace --log-format=pretty",
"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-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"
},
"keywords": [
"antora",
Expand All @@ -19,23 +23,31 @@
"author": "Neo4j",
"license": "ISC",
"dependencies": {
"@antora/cli": "^3.1.7",
"@antora/site-generator-default": "^3.1.7",
"@neo4j-antora/antora-add-notes": "^0.3.1",
"@neo4j-antora/antora-modify-sitemaps": "^0.4.4",
"antora": "3.1.14",
"@neo4j-antora/antora-add-notes": "^0.3.2",
"@neo4j-antora/antora-page-roles": "^0.3.2",
"@neo4j-antora/antora-table-footnotes": "^0.3.2",
"@neo4j-antora/antora-unlisted-pages": "^0.1.0",
"@neo4j-documentation/macros": "^1.0.2",
"@neo4j-antora/roles-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": "^4.19.2",
"nodemon": "^3.1.0"
},
"overrides": {
"@antora/site-generator-default": {
"glob-parent": "6.0.2"
}
"nodemonConfig": {
"watch": [
"**/modules/**",
"**/antora.yml",
"**/preview.yml",
"**/publish.yml"
],
"ext": "yml,yaml,adoc,svg,png,jpg",
"ignore": [
"build",
"node_modules"
]
}
}
12 changes: 5 additions & 7 deletions preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,17 @@ urls:

antora:
extensions:
- require: "@neo4j-antora/antora-modify-sitemaps"
sitemap_version: '5'
sitemap_loc_version: 'current'
move_sitemaps_to_components: true
- require: "@neo4j-antora/antora-unlisted-pages"
- "@neo4j-antora/antora-unlisted-pages"
- "@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-add-notes"
- "@neo4j-antora/antora-page-roles"
- "@neo4j-antora/antora-table-footnotes"
attributes:
page-theme: docs
page-type: Docs
Expand All @@ -51,7 +49,7 @@ asciidoc:
includePDF: false
nonhtmloutput: ""
experimental: ''
copyright: '2024'
copyright: '2025'
common-license-page-uri: https://neo4j.com/docs/license/
check-mark: icon:check[]
cross-mark: icon:times[]
Expand Down
8 changes: 5 additions & 3 deletions publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,17 @@ urls:

antora:
extensions:
- require: "@neo4j-antora/antora-unlisted-pages"
- "@neo4j-antora/antora-unlisted-pages"
- "@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-add-notes"
- "@neo4j-antora/antora-page-roles"
- "@neo4j-antora/antora-table-footnotes"
attributes:
page-theme: docs
page-type: Docs
Expand All @@ -48,7 +50,7 @@ asciidoc:
includePDF: false
nonhtmloutput: ""
experimental: ''
copyright: '2024'
copyright: '2025'
common-license-page-uri: https://neo4j.com/docs/license/
check-mark: icon:check[]
cross-mark: icon:times[]
Expand Down