Skip to content

updating 2 links to videos and testing book built #119

updating 2 links to videos and testing book built

updating 2 links to videos and testing book built #119

on:
push:
branches:
- main
name: renderbook
jobs:
bookdown:
name: Render-Book
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-pandoc@v1
- name: Install TinyTeX
uses: r-lib/actions/setup-tinytex@v1
env:
# install full prebuilt version
TINYTEX_INSTALLER: TinyTeX
- name: update TinyTeX
run: Rscript -e 'install.packages("tinytex"); tinytex::tlmgr_update()'
- name: Install packages
run: Rscript -e 'install.packages(c("rmarkdown","bookdown","devtools"))'
- name: Render gitbook
run: Rscript -e 'bookdown::render_book("index.Rmd", "bookdown::gitbook")'
- name: Render pdfbook
run: Rscript -e 'bookdown::render_book("index.Rmd", "bookdown::pdf_book")'
- uses: actions/upload-artifact@v2
with:
name: _book
path: _book/
# Need to first create an empty gh-pages branch
# see https://pkgdown.r-lib.org/reference/deploy_site_github.html
# and also add secrets for a GH_PAT and EMAIL to the repository
# gh-action from Cecilapp/GitHub-Pages-deploy
checkout-and-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
- name: Deploy to GitHub Pages
uses: Cecilapp/GitHub-Pages-deploy@v3
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
with:
build_dir: _book/ # "_site/" by default
email: ${{ secrets.EMAIL }} # must be a verified email