| 1 |
name: Deploy docs |
| 2 |
on: |
| 3 |
push: |
| 4 |
pull_request: |
| 5 |
schedule: |
| 6 |
- cron: '0 6 * * 6' |
| 7 |
jobs: |
| 8 |
build: |
| 9 |
runs-on: ubuntu-latest |
| 10 |
steps: |
| 11 |
- name: Download source |
| 12 |
uses: actions/checkout@v4 |
| 13 |
- name: Install Python |
| 14 |
uses: actions/setup-python@v5 |
| 15 |
with: |
| 16 |
python-version: '3.12' |
| 17 |
- name: Install dependencies |
| 18 |
run: pip install --no-deps -r requirements/requirements-docs.txt |
| 19 |
- name: Build site |
| 20 |
run: mkdocs build --strict |
| 21 |
- name: Upload to GitHub Pages |
| 22 |
uses: actions/upload-pages-artifact@v3 |
| 23 |
with: |
| 24 |
path: site |
| 25 |
deploy: |
| 26 |
if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch |
| 27 |
needs: build |
| 28 |
permissions: |
| 29 |
pages: write |
| 30 |
id-token: write |
| 31 |
runs-on: ubuntu-latest |
| 32 |
steps: |
| 33 |
- name: Deploy to GitHub Pages |
| 34 |
id: deployment |
| 35 |
uses: actions/deploy-pages@v4 |
| 36 |
environment: |
| 37 |
name: github-pages |
| 38 |
url: ${{ steps.deployment.outputs.page_url }} |