| 1 | name: publish docs |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - main |
| 7 | tags: |
| 8 | - v3.* |
| 9 | |
| 10 | permissions: |
| 11 | contents: read |
| 12 | |
| 13 | jobs: |
| 14 | test-docs: |
| 15 | name: test-docs |
| 16 | runs-on: ubuntu-24.04 |
| 17 | steps: |
| 18 | - uses: actions/checkout@v7 |
| 19 | |
| 20 | - name: Set up Go |
| 21 | uses: actions/setup-go@v6 |
| 22 | with: |
| 23 | go-version: stable |
| 24 | |
| 25 | - name: Set PATH |
| 26 | run: echo "${GITHUB_WORKSPACE}/.local/bin" >>"${GITHUB_PATH}" |
| 27 | |
| 28 | - run: make ensure-gfmrun |
| 29 | |
| 30 | - run: make gfmrun |
| 31 | env: |
| 32 | FLAGS: --walk docs/v3/ |
| 33 | |
| 34 | - run: make diffcheck |
| 35 | |
| 36 | publish: |
| 37 | permissions: |
| 38 | contents: write |
| 39 | if: startswith(github.ref, 'refs/tags/') |
| 40 | name: publish |
| 41 | needs: [test-docs] |
| 42 | runs-on: ubuntu-24.04 |
| 43 | steps: |
| 44 | - uses: actions/checkout@v7 |
| 45 | with: |
| 46 | fetch-depth: 0 |
| 47 | |
| 48 | - uses: actions/setup-python@v6 |
| 49 | with: |
| 50 | python-version: '3.13' |
| 51 | cache: pip |
| 52 | cache-dependency-path: mkdocs-requirements.txt |
| 53 | |
| 54 | - name: Ensure mkdocs is available |
| 55 | run: make ensure-mkdocs |
| 56 | |
| 57 | - name: Set mkdocs remote |
| 58 | run: make set-mkdocs-remote |
| 59 | env: |
| 60 | MKDOCS_REMOTE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 61 | |
| 62 | - name: Deploy via mkdocs |
| 63 | run: make deploy-mkdocs |