Skip to content

Commit

Permalink
update so that gh-pages is still orphaned properly
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorcampbell committed Aug 21, 2024
1 parent b7a7149 commit ad78100
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/update_book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,22 @@ jobs:
with:
ref: 'gh-pages'

- name: remove all pull and diff folders
- name: Copy contents of dev/ to home folder
run: |
rm -rf pull* diff*
yes | cp -rf dev ${{ runner.home }}
- name: copy dev website to root directory
# Push update website to dev/ and clean out old commits
- name: Update website to contents of dev, remove all old commits and subpages
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: copy dev/ website back in
run: |
yes | cp -rf dev/* .
yes | cp -rf ${{ runner.home }}/dev dev
- name: push the result to gh-pages
uses: stefanzweifel/git-auto-commit-action@v5

0 comments on commit ad78100

Please sign in to comment.