move docs to UV #580
Workflow file for this run
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: "Python Package" | |
on: | |
push: | |
branches: [ "develop" ] | |
tags: [ '*' ] | |
pull_request: | |
branches: [ "develop" ] | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: { python-version: "${{ matrix.python-version }}" } | |
- run: pip install . && slap install --no-venv-check | |
- run: slap info | |
- run: slap test | |
- run: slap publish --dry | |
test-pep508: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: { python-version: "${{ matrix.python-version }}" } | |
- run: pip install mypy dataclasses types-dataclasses -q | |
- run: mypy src/slap/python/pep508.py --follow-imports silent | |
- run: python src/slap/python/pep508.py | |
docs: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: { fetch-depth: 0 } | |
- run: git checkout -b $GITHUB_HEAD_REF | |
if: github.event_name == 'pull_request' | |
- uses: actions/setup-python@v5 | |
with: { python-version: "3.10" } | |
- uses: astral-sh/setup-uv@v5 | |
- run: uv tool install . | |
- run: slap run --no-venv-check docs:build | |
- uses: actions/upload-artifact@v4 | |
with: { name: docs, path: docs/site } | |
docs-publish: | |
needs: [ test, docs ] | |
runs-on: ubuntu-22.04 | |
if: ${{ github.ref == 'refs/heads/develop' }} | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: { name: docs, path: docs/site } | |
- uses: Cecilapp/GitHub-Pages-deploy@v3 | |
env: { GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" } | |
with: { email: [email protected], build_dir: docs/site } |