Merge pull request #528 from UBC-DSCI/main #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rebuild and deploy book to gh-pages branch | |
on: | |
push: | |
branches: | |
- production | |
paths: | |
- 'index.Rmd' | |
- '_bookdown.yml' | |
- '_output.yml' | |
- 'source/*.Rmd' | |
- 'source/*.bib' | |
- 'source/*.css' | |
- 'data/**' | |
- 'img/**' | |
jobs: | |
deploy-book: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
ref: 'production' | |
- name: Build the book | |
run: | | |
./build_html.sh | |
# Push the book's HTML to github-pages | |
- name: GitHub Pages action | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/ | |
force_orphan: true | |
cname: datasciencebook.ca | |