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 : Build and Deploy Jupyter Book
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ workflow_dispatch :
9+
10+ permissions :
11+ contents : read
12+ pages : write
13+ id-token : write
14+
15+ concurrency :
16+ group : pages
17+ cancel-in-progress : true
18+
19+ jobs :
20+ build :
21+ runs-on : ubuntu-latest
22+
23+ steps :
24+ - name : Check out repository
25+ uses : actions/checkout@v4
26+
27+ - name : Set up Python
28+ uses : actions/setup-python@v6
29+ with :
30+ python-version : " 3.12"
31+
32+ - name : Install uv
33+ uses : astral-sh/setup-uv@v7
34+ with :
35+ enable-cache : true
36+
37+ - name : Sync project dependencies
38+ run : uv sync --locked
39+
40+ - name : Install SPARQL kernel
41+ run : uv run jupyter sparqlkernel install --user
42+
43+ - name : Build Jupyter Book
44+ run : |
45+ uv run jupyter-book build .
46+ touch _build/html/.nojekyll
47+
48+ - name : Prune uv cache
49+ if : always()
50+ run : uv cache prune --ci
51+
52+ - name : Configure GitHub Pages
53+ if : github.event_name != 'pull_request'
54+ uses : actions/configure-pages@v5
55+
56+ - name : Upload Pages artifact
57+ if : github.event_name != 'pull_request'
58+ uses : actions/upload-pages-artifact@v3
59+ with :
60+ path : _build/html
61+
62+ deploy :
63+ if : github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
64+ environment :
65+ name : github-pages
66+ url : ${{ steps.deployment.outputs.page_url }}
67+ needs : build
68+ runs-on : ubuntu-latest
69+
70+ steps :
71+ - name : Deploy to GitHub Pages
72+ id : deployment
73+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 1+ [project ]
2+ name = " brick-docs"
3+ version = " 0.1.0"
4+ description = " Add your description here"
5+ authors = [
6+ { name = " Gabe Fierro" , email = " gtfierro@mines.edu" }
7+ ]
8+ dependencies = [
9+ " jupyter-book>=1.0.0" ,
10+ " numpy>=1.26.4" ,
11+ " matplotlib>=3.8.4" ,
12+ " sphinxcontrib-bibtex>=2.6.2" ,
13+ " sparqlkernel>=1.3.0" ,
14+ ]
15+ readme = " README.md"
16+ requires-python = " >= 3.12"
17+
18+ [build-system ]
19+ requires = [" hatchling" ]
20+ build-backend = " hatchling.build"
21+
22+ [tool .rye ]
23+ managed = true
24+ dev-dependencies = []
25+
26+ [tool .hatch .metadata ]
27+ allow-direct-references = true
28+
29+ [tool .hatch .build .targets .wheel ]
30+ packages = [" src/brick_docs" ]
You can’t perform that action at this time.
0 commit comments