-
Notifications
You must be signed in to change notification settings - Fork 13
44 lines (43 loc) · 1.44 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# This workflow will generate html documentation from asciidoc and publish it to `gh-pages` branch
name: Deploy documentation
on:
push:
branches:
- master
jobs:
generate-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout branch [master]
uses: actions/checkout@v3
with:
ref: master
- name: Push [master] to [gh-pages]
shell: bash
run: git push origin master:gh-pages --force
- name: Checkout [gh-pages]
uses: actions/checkout@v3
with:
ref: gh-pages
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Generate docs with Maven
run: |
mvn org.asciidoctor:asciidoctor-maven-plugin:2.2.2:process-asciidoc \
-Dasciidoctor.sourceDirectory=./docs \
-Dasciidoctor.outputDirectory=. \
-Dasciidoctor.preserveDirectories=true \
-Dasciidoctor.sourceHighlighter=coderay \
-Dasciidoctor.backend=html5 \
-Dasciidoctor.requires=asciidoctor-diagram
- name: Commit and push to [gh-pages]
shell: bash
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Action - Deploy documentation"
git add .
git commit -m "Add auto-generated documentation"
git push origin gh-pages --force