File tree Expand file tree Collapse file tree 2 files changed +37
-2
lines changed Expand file tree Collapse file tree 2 files changed +37
-2
lines changed Original file line number Diff line number Diff line change 30
30
github_token : ${{ secrets.GITHUB_TOKEN }}
31
31
publish_dir : source/_build/html
32
32
cname : python.datasciencebook.ca
33
- keep_files : true
34
- # force_orphan: true # once peaceiris updates to v4, change this to true and keep_files: true for the PR / main branch deploy previews
33
+ force_orphan : true # this will clean up all previous PR previews / main branch preview
35
34
36
35
Original file line number Diff line number Diff line change
1
+ name : " Rebuild and deploy PR version of book to gh-pages branch in pull###/ folder"
2
+ on :
3
+ pull_request :
4
+ types : [reopened, opened, synchronize]
5
+ paths :
6
+ - source/**
7
+ jobs :
8
+ deploy-book :
9
+ runs-on : ubuntu-latest
10
+ permissions :
11
+ contents : write
12
+ packages : write
13
+
14
+ steps :
15
+ - name : checkout
16
+ uses : actions/checkout@v2
17
+ with :
18
+ fetch-depth : ' 0'
19
+ ref : ${{ github.head_ref }}
20
+
21
+ - name : Build the book
22
+ run : |
23
+ ./build_html.sh
24
+
25
+ # Push the book's HTML to github-pages
26
+ - name : GitHub Pages action
27
+
28
+ with :
29
+ github_token : ${{ secrets.GITHUB_TOKEN }}
30
+ publish_dir : source/_build/html
31
+ keep_files : true
32
+ destination_dir : pull${{ github.event.number }}
33
+ # force_orphan: true # once peaceiris updates to v4, change this to true and keep_files: true for the PR / main branch deploy previews
34
+
35
+
36
+
You can’t perform that action at this time.
0 commit comments