Update jekyll-gh-pages.yml #16
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
on: | |
push: | |
branches: | |
- master | |
name: renderbook | |
jobs: | |
bookdown: | |
name: Render-Book | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- name: Install rmarkdown | |
run: Rscript -e 'install.packages(c("rmarkdown","bookdown"))' | |
- name: Render Book | |
run: Rscript -e 'bookdown::render_book("README.md")' | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: _book | |
path: _book/ | |
# Deployment job | |
deploy: | |
runs-on: ubuntu-latest | |
needs: bookdown | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Download artifact | |
uses: actions/[email protected] | |
with: | |
# Artifact name | |
name: _book # optional | |
# Destination path | |
path: _book # optional | |
build_dir: _book | |
target_branch: gh-pages | |
- name: Deploy to GitHub Pages | |
uses: Cecilapp/GitHub-Pages-deploy@master | |
env: | |
EMAIL: ${{ secrets.EMAIL }} # must be a verified email | |
GH_TOKEN: ${{ secrets.GH_PAT }} # https://github.com/settings/tokens | |
BUILD_DIR: _book/ # "_site/" by default |