File tree Expand file tree Collapse file tree 2 files changed +31
-12
lines changed
Expand file tree Collapse file tree 2 files changed +31
-12
lines changed Original file line number Diff line number Diff line change 11name : docs
22
33on :
4- push :
5- branches :
6- - main
7- - v2/docs
4+ release :
5+ types :
6+ - created
7+ pull_request :
8+ paths :
9+ - docs/**
10+ - mkdocs.yml
11+ - pyproject.toml
12+ - README.md
813
914permissions :
10- contents : write
15+ contents : read
1116
1217jobs :
13- build-and-deploy :
18+ build :
1419 runs-on : ubuntu-latest
1520 steps :
1621 - name : Checkout
@@ -25,13 +30,27 @@ jobs:
2530 uses : astral-sh/setup-uv@v3
2631
2732 - name : Install docs dependencies
28- run : uv pip install -e ".[docs]"
33+ run : uv sync --all-extras --dev
2934
3035 - name : Build site
3136 run : uv run mkdocs build
3237
33- - name : Deploy to GitHub Pages
34- uses : peaceiris/ actions-gh- pages@v4
38+ - name : Upload Pages artifact
39+ uses : actions/upload- pages-artifact@v3
3540 with :
36- github_token : ${{ secrets.GITHUB_TOKEN }}
37- publish_dir : site
41+ path : site
42+
43+ deploy :
44+ if : github.event_name == 'release'
45+ needs : build
46+ runs-on : ubuntu-latest
47+ permissions :
48+ pages : write
49+ id-token : write
50+ environment :
51+ name : github-pages
52+ url : ${{ steps.deployment.outputs.page_url }}
53+ steps :
54+ - name : Deploy to GitHub Pages
55+ id : deployment
56+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ uv run prek run --all-files
3838
3939## Project guidelines
4040
41- - Use Python 3.10–3.13 features and type annotations.
41+ - Use Python 3.10+ features and type annotations.
4242- Keep absolute imports and avoid relative imports.
4343- Preserve existing comments and logging unless your change requires updates.
4444- Prefer small, focused changes and add tests when behavior changes.
You can’t perform that action at this time.
0 commit comments