File tree Expand file tree Collapse file tree 2 files changed +13
-15
lines changed Expand file tree Collapse file tree 2 files changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -20,22 +20,18 @@ jobs:
20
20
with :
21
21
ref : ' gh-pages'
22
22
23
- - name : Copy contents of dev/ to home folder
23
+ - name : Clean the site contents except for dev, pull contents of dev/ to main site
24
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
25
+ # delete everything except the dev and .git folders
26
+ find . -maxdepth 1 ! -name ".git" ! -name "dev" ! -name "." | xargs rm -rf
27
+ # copy the contents of dev into the root
28
+ cp -rf dev/* .
29
+
30
+ # Push updated website, clean out old commits
31
+ - name : Update website
29
32
uses : peaceiris/actions-gh-pages@v3.8.0
30
33
with :
31
34
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
35
+ publish_dir : ./
36
+ force_orphan : true
37
+ cname : python.datasciencebook.ca
Original file line number Diff line number Diff line change @@ -48,3 +48,5 @@ This work by [Tiffany Timbers](https://www.tiffanytimbers.com/),
48
48
and [ Lindsey Heagy] ( https://lindseyjh.ca/ )
49
49
is licensed under
50
50
a [ Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License] ( http://creativecommons.org/licenses/by-nc-sa/4.0/ ) .
51
+
52
+
You can’t perform that action at this time.
0 commit comments