fix: separate virtual environment steps to two #8
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
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
- name: Set up Python | |
run: uv python install 3.11 | |
- name: Set up virtual environment | |
run: uv venv | |
- name: Activate virtual environment | |
run: source .venv/bin/activate | |
- name: Load development dependencies | |
run: uv sync --dev | |
- name: Generate documentation | |
run: pdoc src/**/*.py --output docs/ | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: docs/ | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- id: deployment | |
uses: actions/deploy-pages@v4 | |
name: Convert docstrings to Pdoc pages | |
on: | |
push: | |
branches: | |
- master | |
permissions: | |
contents: read |