Restructure 06, 09, 10 to remove duplicated info and update #146
Workflow file for this run
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
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples | |
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | |
# Test bookdown building on all branches | |
name: test-bookdown | |
on: | |
push: | |
# paths: '**.Rmd' | |
workflow_dispatch: | |
jobs: | |
test-bookdown: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: install remotes | |
run: Rscript -e 'install.packages(c("remotes"))' | |
# Install DiagrammeR for making a code review flowchart | |
- name: install DiagrammeR | |
run: Rscript -e 'install.packages(c("DiagrammeR"))' | |
- name: Install system dependencies | |
if: runner.os == 'Linux' | |
run: | | |
while read -r cmd | |
do | |
eval sudo $cmd | |
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') | |
- name: install extra pkgs (suggests or used in rmd files) | |
run: Rscript -e 'install.packages(c("bookdown"))' | |
# only needed to check that this workflow does not run multiple times in a row | |
- name: get last commit msg | |
id: commit-msg | |
run: | | |
git tag | |
last_commit_msg=$(git log -1 --pretty=%B) | |
echo "::set-output name=msg::${last_commit_msg}" | |
- name: Cache bookdown results | |
uses: actions/cache@v2 | |
with: | |
path: docs | |
key: bookdown-${{ hashFiles('**/*Rmd') }} | |
restore-keys: bookdown- | |
- name: Build site | |
run: Rscript -e 'bookdown::render_book(quiet = TRUE)' | |
- name: Save artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Bookdown_html | |
path: docs | |