77 workflow_dispatch :
88
99permissions :
10- contents : write
10+ contents : read
11+ pages : write # Required for deploying to GitHub Pages
12+ id-token : write # Required for OIDC tokens
13+
14+ # Ensure only one concurrent deployment is running
15+ concurrency :
16+ group : " pages"
17+ cancel-in-progress : false
1118
1219jobs :
13- build-and-deploy :
20+ build :
1421 runs-on : ubuntu-latest
1522 steps :
1623 - name : Checkout
1724 uses : actions/checkout@v4
1825
1926 - name : Install System Dependencies (GDAL)
20- # Fiona needs gdal-config to determine versions and paths
2127 run : |
2228 sudo apt-get update
2329 sudo apt-get install -y libgdal-dev g++
@@ -31,20 +37,28 @@ jobs:
3137 run : uv python install
3238
3339 - name : Install dependencies
34- # We set GDAL_CONFIG so Fiona's build backend finds the system GDAL
3540 run : |
36- export GDAL_CONFIG=/usr/bin/gdal-config
3741 uv sync --all-extras
3842 env :
3943 GDAL_CONFIG : /usr/bin/gdal-config
4044
4145 - name : Build documentation
4246 run : |
43- # Re-export or use uv run --env to ensure Sphinx can see Fiona
4447 uv run sphinx-build -b html docs/source docs/build/html
4548
46- - name : Deploy to GitHub Pages
47- uses : peaceiris/ actions-gh- pages@v4
49+ - name : Upload artifact
50+ uses : actions/upload- pages-artifact@v3
4851 with :
49- github_token : ${{ secrets.GITHUB_TOKEN }}
50- publish_dir : ./docs/build/html
52+ path : ./docs/build/html
53+
54+ deploy :
55+ environment :
56+ name : github-pages
57+ url : ${{ steps.deployment.outputs.page_url }}
58+ runs-on : ubuntu-latest
59+ needs : build
60+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
61+ steps :
62+ - name : Deploy to GitHub Pages
63+ id : deployment
64+ uses : actions/deploy-pages@v4
0 commit comments