File tree Expand file tree Collapse file tree 1 file changed +10
-20
lines changed Expand file tree Collapse file tree 1 file changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -20,27 +20,17 @@ 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 $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
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 : checkout gh-pages
37
- uses : actions/checkout@v2
38
- with :
39
- ref : ' gh-pages'
40
-
41
- - name : copy dev/ website back in
42
- run : |
43
- yes | cp -rf $HOME/dev dev
44
-
45
- - name : push the result to gh-pages
46
- uses : stefanzweifel/git-auto-commit-action@v5
35
+ force_orphan : true
36
+ cname : python.datasciencebook.ca
You can’t perform that action at this time.
0 commit comments