feat: use asciidoctor #3
This file contains hidden or 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
| name: Documentation Build and Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - '**' # Run on all branches for build/test | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| permissions: | |
| contents: write # Für peaceiris/actions-gh-pages@v3 | |
| pages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # 1. Dokumentation mit Asciidoctor bauen (unter Verwendung von Docker) | |
| - name: Build Documentation | |
| uses: docker://asciidoctor/docker-asciidoctor | |
| with: | |
| args: asciidoctor -R docs -D build/site/html -a docinfo=shared -a toc=left -a toclevels=2 'docs/index.adoc' | |
| # 2. Deployment zu gh-pages | |
| - name: Deploy to GitHub Pages | |
| if: github.ref == 'refs/heads/main' | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./build/site/html | |
| publish_branch: gh-pages |