File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy Book
2
+
3
+ # Run this on push to main branch
4
+ on :
5
+ push :
6
+ branches :
7
+ - main
8
+
9
+ jobs :
10
+ deploy-book :
11
+ runs-on : ubuntu-latest
12
+ permissions :
13
+ pages : write
14
+ id-token : write
15
+ steps :
16
+ - uses : actions/checkout@v3
17
+
18
+ # Install dependencies
19
+ - name : Set up Python 3.11
20
+ uses : actions/setup-python@v4
21
+ with :
22
+ python-version : 3.11
23
+
24
+ - name : Install dependencies
25
+ run : |
26
+ pip install -r requirements.txt
27
+
28
+ # (optional) Cache your executed notebooks between runs
29
+ - name : Cache executed notebooks
30
+ uses : actions/cache@v3
31
+ with :
32
+ path : _build/.jupyter_cache
33
+ key : jupyter-book-cache-${{ hashFiles('requirements.txt') }}
34
+
35
+ # Build the book
36
+ - name : Build the book
37
+ run : |
38
+ jupyter-book build .
39
+
40
+ # Upload the book's HTML as an artifact
41
+ - name : Upload artifact
42
+ uses : actions/upload-pages-artifact@v2
43
+ with :
44
+ path : " _build/html"
45
+
46
+ # Deploy the book's HTML to GitHub Pages
47
+ - name : Deploy to GitHub Pages
48
+ id : deployment
49
+ uses : actions/deploy-pages@v2
You can’t perform that action at this time.
0 commit comments