| 1 | name: Publish documentation |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - main |
| 7 | paths: |
| 8 | - docs/** |
| 9 | workflow_dispatch: |
| 10 | |
| 11 | permissions: |
| 12 | contents: read |
| 13 | pages: write |
| 14 | id-token: write |
| 15 | |
| 16 | concurrency: |
| 17 | group: pages |
| 18 | cancel-in-progress: false |
| 19 | |
| 20 | jobs: |
| 21 | build: |
| 22 | runs-on: ubuntu-latest |
| 23 | steps: |
| 24 | - name: Checkout |
| 25 | uses: actions/checkout@v6 |
| 26 | |
| 27 | - name: Install python |
| 28 | uses: actions/setup-python@v6 |
| 29 | with: |
| 30 | python-version: 3.x |
| 31 | |
| 32 | - name: Setup Pages |
| 33 | id: pages |
| 34 | uses: actions/configure-pages@v5 |
| 35 | |
| 36 | - name: Install dependencies |
| 37 | run: pip install mkdocs-material mkdocs-glightbox mkdocs-minify-plugin |
| 38 | |
| 39 | - name: Build site |
| 40 | run: mkdocs build |
| 41 | |
| 42 | - name: Upload artifact |
| 43 | uses: actions/upload-pages-artifact@v4 |
| 44 | with: |
| 45 | path: ./site |
| 46 | |
| 47 | deploy: |
| 48 | environment: |
| 49 | name: github-pages |
| 50 | url: ${{ steps.deployment.outputs.page_url }} |
| 51 | runs-on: ubuntu-latest |
| 52 | needs: build |
| 53 | steps: |
| 54 | - name: Deploy to GitHub Pages |
| 55 | id: deployment |
| 56 | uses: actions/deploy-pages@v4 |