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