Skip to content

Commit eec283f

Browse files
Merge pull request #355 from UBC-DSCI/main
Public site rebuild
2 parents 3415c29 + fe803b4 commit eec283f

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

.github/workflows/update_book.yml

+11-15
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,18 @@ jobs:
2020
with:
2121
ref: 'gh-pages'
2222

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
2424
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
2932
uses: peaceiris/actions-gh-pages@v3.8.0
3033
with:
3134
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

source/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ This work by [Tiffany Timbers](https://www.tiffanytimbers.com/),
4848
and [Lindsey Heagy](https://lindseyjh.ca/)
4949
is licensed under
5050
a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/).
51+
52+

0 commit comments

Comments
 (0)