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: Build docs and upload ZIP | |
| on: | |
| push: | |
| branches: | |
| - 4.x | |
| pull_request: | |
| branches: | |
| - 4.x | |
| workflow_dispatch: | |
| jobs: | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| # pull-requests: write | |
| steps: | |
| # 1. Checkout doc branch | |
| - name: Checkout current branch | |
| uses: actions/checkout@v4 | |
| # 2. Java 8 | |
| - name: Set up Java 8 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "8" | |
| # 3. Python 3.10.19 + MkDocs + plugins | |
| - name: Set up Python 3.10.19 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10.19" | |
| - name: Install MkDocs dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install \ | |
| mkdocs \ | |
| mkdocs-material \ | |
| mkdocs-awesome-pages-plugin \ | |
| mkdocs-macros-plugin | |
| # 4. Build docs via build-doc.sh | |
| - name: Build documentation | |
| run: | | |
| chmod +x ./build-doc.sh | |
| ./build-doc.sh | |
| # 5. Upload built docs as a ZIP artifact | |
| - name: Archive built documentation | |
| run: | | |
| zip -r docs-built.zip docs | |
| - name: Upload built doc artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: built-docs-zip | |
| path: docs-built.zip | |
| retention-days: 10 |