File tree Expand file tree Collapse file tree 1 file changed +24
-4
lines changed Expand file tree Collapse file tree 1 file changed +24
-4
lines changed Original file line number Diff line number Diff line change 1
1
name : deploy-book
2
2
3
- # Run this on push to master/ main branches and on pull requests
3
+ # Run this on push to main branches and on pull requests
4
4
on :
5
5
push :
6
6
branches :
11
11
12
12
# This job installs dependencies, builds the book, and pushes it to `gh-pages`
13
13
jobs :
14
- deploy -book :
14
+ build -book :
15
15
runs-on : ubuntu-latest
16
16
permissions :
17
17
pages : write
33
33
# if you have config:
34
34
# execute:
35
35
# execute_notebooks: cache
36
- - name : cache executed notebooks
36
+ - name : Cache executed notebooks
37
37
uses : actions/cache@v3
38
38
with :
39
39
path : _build/.jupyter_cache
@@ -46,11 +46,31 @@ jobs:
46
46
47
47
# Upload the book's HTML as an artifact
48
48
- name : Upload artifact
49
- uses : actions/upload-pages-artifact@v2
49
+ uses : actions/upload-artifact@v3
50
+ with :
51
+ name : jupyter-book-html
52
+ path : " _build/html"
53
+
54
+ deploy-book :
55
+ needs : build-book
56
+ runs-on : ubuntu-latest
57
+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
58
+ permissions :
59
+ pages : write
60
+ id-token : write
61
+ steps :
62
+ - uses : actions/checkout@v3
63
+
64
+ # Download the built book artifact
65
+ - name : Download artifact
66
+ uses : actions/download-artifact@v3
50
67
with :
68
+ name : jupyter-book-html
51
69
path : " _build/html"
52
70
53
71
# Deploy the book's HTML to GitHub Pages
54
72
- name : Deploy to GitHub Pages
55
73
id : deployment
56
74
uses : actions/deploy-pages@v2
75
+ with :
76
+ path : " _build/html"
You can’t perform that action at this time.
0 commit comments