Merge pull request #719 from i-Cell-Mobilsoft-Open-Source/feature/712… #353
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |