Skip to content

Commit e04a471

Browse files
committed
Added github action to trigger doc build
1 parent 08ef469 commit e04a471

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/docs.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Trigger documentation build
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
paths:
8+
- 'docs/**'
9+
pull_request:
10+
branches:
11+
- 'main'
12+
paths:
13+
- 'docs/**'
14+
15+
env:
16+
VALE_VERSION: ${{ vars.LIBRARY_VALE_VERSION || '3.3.0' }}
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Install Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '20'
29+
30+
- name: Install vale
31+
run: |
32+
wget "https://github.com/errata-ai/vale/releases/download/v${VALE_VERSION}/vale_${VALE_VERSION}_Linux_64-bit.tar.gz"
33+
sudo tar -xvzf vale_${VALE_VERSION}_Linux_64-bit.tar.gz -C /usr/local/bin vale
34+
35+
- name: Generate Site
36+
run: |
37+
cd docs/_playbook/
38+
npm install
39+
export GIT_CREDENTIALS='https://axoniq-devops:${{ secrets.LIBRARY_DEVBOT_TOKEN }}@github.com'
40+
echo 'Using' `vale -v`
41+
npx antora playbook.yaml
42+
43+
- name: Notify AxonIQ Library (if a push to a tracked branch)
44+
if: ${{ github.event_name == 'push'}}
45+
uses: actions/github-script@v7
46+
with:
47+
github-token: ${{ secrets.LIBRARY_DEVBOT_TOKEN }}
48+
script: |
49+
await github.rest.actions.createWorkflowDispatch({
50+
owner: 'AxonIQ',
51+
repo: 'axoniq-library-site',
52+
workflow_id: 'publish.yml',
53+
ref: 'main'
54+
})

0 commit comments

Comments
 (0)