Skip to content

Commit 715218e

Browse files
authored
add docs-publish workflow (#221)
1 parent 64080f7 commit 715218e

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/docs-publish.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
2+
name: "Publish Branch"
3+
4+
on:
5+
push:
6+
branches:
7+
- 'dev'
8+
- '5.x'
9+
workflow_dispatch:
10+
# schedule:
11+
# - cron: '00 16 * * *'
12+
13+
env:
14+
PUBLISH_TO: ${{ github.ref == 'refs/heads/5.x' && 'prod' || 'dev' }}
15+
16+
jobs:
17+
18+
# Generate HTML
19+
docs-build:
20+
uses: neo4j/docs-tools/.github/workflows/[email protected]
21+
with:
22+
deploy-id: 0
23+
retain-artifacts: 14
24+
25+
# Parse the json log output from the HTML build, and output warnings and errors as annotations
26+
# Optionally, fail the build if there are warnings or errors
27+
# By default, the job fails if there are errors, passes if there are warnings only.
28+
docs-verify:
29+
needs: docs-build
30+
uses: neo4j/docs-tools/.github/workflows/[email protected]
31+
with:
32+
failOnWarnings: true
33+
34+
trigger-publish:
35+
needs: docs-verify
36+
runs-on: ubuntu-latest
37+
38+
steps:
39+
- name: Trigger Publish
40+
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0
41+
with:
42+
token: ${{ secrets.DOCS_DISPATCH_TOKEN }}
43+
repository: neo4j/docs-publish
44+
event-type: ${{ github.event.repository.name }}
45+
client-payload: |-
46+
{
47+
"org": "${{ github.repository_owner }}",
48+
"repo": "${{ github.event.repository.name }}",
49+
"run_id": "${{ github.run_id }}",
50+
"branch": "${{ github.ref_name }}",
51+
"args": "--dryrun",
52+
"publish_env": "${{ env.PUBLISH_TO }}",
53+
"docsets": [
54+
"status-codes"
55+
]
56+
}

0 commit comments

Comments
 (0)