add package to render demo #20
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: deploy workshop | |
on: | |
push: | |
branches: main | |
pull_request: | |
branches: main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: rocker/verse:latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: remotes | |
- name: Build presentation | |
run: | | |
rmarkdown::render("index.Rmd", "all") | |
shell: Rscript {0} | |
- name: Build PDF | |
run: | | |
pagedown::chrome_print("index.html") | |
shell: Rscript {0} | |
- name: Build data and script | |
run: | | |
knitr::purl("index.Rmd", "script.R") | |
zip("data_and_script.zip", c("data", "script.R")) | |
shell: Rscript {0} | |
- name: Deploy workshop | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.DEPLOY_TOKEN }} | |
publish_dir: . | |
exclude_assets: '.github,.gitignore,DESCRIPTION,makefile' |