revamped examples #72
This file contains 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: | |
- master | |
workflow_dispatch: | |
jobs: | |
documentation: | |
runs-on: ubuntu-latest | |
env: | |
UV_CACHE_DIR: /tmp/.uv-cache | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up uv | |
run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
- name: Cache folder for uv | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/.uv-cache | |
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
restore-keys: | | |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
uv-${{ runner.os }} | |
- name: Install dependencies | |
run: | | |
uv sync --all-extras --dev | |
- name: Build pages | |
working-directory: docs | |
run: | | |
uv run make html | |
- name: Minimize uv cache | |
run: uv cache prune --ci | |
- name: Deploy pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/build/html |