chore: bump v0.3.3 #222
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: docs | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
paths: | |
- 'docs/**' | |
permissions: | |
contents: write | |
jobs: | |
docs-build: | |
runs-on: ubuntu-latest | |
if: github.ref != 'refs/heads/main' | |
steps: | |
# https://github.com/actions/checkout | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v3 | |
# https://github.com/actions/setup-python | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install the latest version of uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "latest" | |
- name: Sphinx build | |
run: | | |
just docs | |
docs-push: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
steps: | |
# https://github.com/actions/checkout | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v3 | |
# https://github.com/actions/setup-python | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install the latest version of uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "latest" | |
- name: Sphinx build | |
run: | | |
just docs | |
# https://github.com/peaceiris/actions-gh-pages | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/docs-website' }} | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/_build/ | |
force_orphan: true |