Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #61
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: | |
pull_request: | |
name: Build and deploy book | |
jobs: | |
build_bookdown: | |
name: "Build Bookdown Site" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{github.ref}} | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
r-version: "4.0.5" | |
- name: Install System Dependencies | |
run: | | |
sudo apt-get install pandoc libnlopt-dev libcurl4-openssl-dev | |
- name: Render Book | |
run: | | |
R -e "renv::restore()" | |
R -e 'bookdown::render_book(output_dir = "site")' | |
touch site/.nojekyll | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: site | |
path: site/ | |
publish_to_ghp: | |
name: "Publish to GitHub Pages" | |
if: ${{github.ref}} == "main" & github.event_name != 'pull_request' | |
runs-on: ubuntu-latest | |
needs: build_bookdown | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{github.ref}} | |
- uses: actions/[email protected] | |
with: | |
name: site | |
path: site/ | |
- uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: site |