File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy Sphinx Docs
2+
3+ # 1. Execution triggers
4+
5+ on :
6+ push :
7+ branches : ["main"] # When pushing to main branch
8+ workflow_dispatch : # Manual trigger
9+
10+ # 2. Needed permissions to depliy in GitHub pages
11+ permissions :
12+ contents : read
13+ pages : write
14+ id-token : write
15+
16+ # 3. Jobs definition
17+ jobs :
18+ build-and-deploy :
19+ runs-on : ubuntu-latest
20+ environment :
21+ name : github-pages
22+ url : ${{ steps.deployment.outputs.page_url }}
23+
24+ steps :
25+ - name : Checkout code
26+ uses : actions/checkout@v4
27+
28+ - name : Install uv
29+ uses : astral-sh/setup-uv@v5
30+ with :
31+ version : " latest"
32+ enable-cache : true # Store libraries in cache
33+
34+ - name : Set up Python
35+ run : uv python install # Install python version in uv
36+
37+ - name : Install dependencies
38+ run : uv sync --frozen # Instala uv libraries
39+
40+ - name : Build documentation
41+ # Generate HTML files
42+ run : uv run sphinx-build -b html docs/source docs/build/html
43+
44+ - name : Setup Pages
45+ uses : actions/configure-pages@v4
46+
47+ - name : Upload artifact
48+ uses : actions/upload-pages-artifact@v3
49+ with :
50+ # Specify HTML route
51+ path : ' docs/build/html'
52+
53+ - name : Deploy to GitHub Pages
54+ id : deployment
55+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments