File tree Expand file tree Collapse file tree 2 files changed +41
-71
lines changed
Expand file tree Collapse file tree 2 files changed +41
-71
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Rebuild and deploy book to gh-pages branch
2+ on :
3+ push :
4+ branches :
5+ - production
6+ paths :
7+ - ' source/**'
8+ - ' build_html.sh'
9+
10+ jobs :
11+ deploy-book :
12+ runs-on : ubuntu-latest
13+ permissions :
14+ contents : write
15+ packages : write
16+
17+ steps :
18+ - name : checkout gh-pages
19+ uses : actions/checkout@v2
20+ with :
21+ ref : ' gh-pages'
22+
23+ - name : Copy contents of dev/ to home folder
24+ run : |
25+ yes | cp -rf dev ${{ runner.home }}
26+
27+ # Push update website to dev/ and clean out old commits
28+ - name : Update website to contents of dev, remove all old commits and subpages
29+ uses : peaceiris/actions-gh-pages@v3.8.0
30+ with :
31+ github_token : ${{ secrets.GITHUB_TOKEN }}
32+ publish_dir : dev/
33+ force_orphan : true # this will clean up all previous PR previews / main branch preview
34+ cname : datasciencebook.ca
35+
36+ - name : copy dev/ website back in
37+ run : |
38+ yes | cp -rf ${{ runner.home }}/dev dev
39+
40+ - name : push the result to gh-pages
41+ uses : stefanzweifel/git-auto-commit-action@v5
You can’t perform that action at this time.
0 commit comments