Skip to content

Commit

Permalink
Merge pull request #588 from UBC-DSCI/main
Browse files Browse the repository at this point in the history
Rebuild public site
  • Loading branch information
trevorcampbell authored Aug 21, 2024
2 parents 9df4714 + d1b9576 commit e47b65d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/update_book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,17 @@ jobs:
with:
ref: 'gh-pages'

- name: Copy contents of dev/ to home folder
- name: Clean the site contents except for dev, pull contents of dev/ to main site
run: |
yes | cp -rf dev $HOME
# Push update website to dev/ and clean out old commits
- name: Update website to contents of dev, remove all old commits and subpages
# delete everything except the dev folder
ls -1 --hide=dev | xargs rm -rf
# copy the contents of dev into the root
cp -rf dev/* .
# Push updated website, clean out old commits
- name: Update website
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: dev/
force_orphan: true # this will clean up all previous PR previews / main branch preview
cname: datasciencebook.ca

- name: checkout gh-pages again (to grab new orphaned upstream branch)
uses: actions/checkout@v2
with:
ref: 'gh-pages'

- name: copy dev/ website back in
run: |
yes | cp -rf $HOME/dev dev
- name: push the result to gh-pages
uses: stefanzweifel/git-auto-commit-action@v5
2 changes: 0 additions & 2 deletions index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,3 @@ knitr::include_graphics("img/frontmatter/ds-a-first-intro-cover.jpg")
This work by [Tiffany Timbers](https://www.tiffanytimbers.com/), [Trevor Campbell](https://trevorcampbell.me/),
and [Melissa Lee](https://www.stat.ubc.ca/users/melissa-lee) is licensed under
a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/).


0 comments on commit e47b65d

Please sign in to comment.