Skip to content

Updated renderbook.yml #125

Updated renderbook.yml

Updated renderbook.yml #125

Workflow file for this run

on:
pull_request:
branches: [ gh-pages ]
types: [ closed ]
name: renderbook
jobs:
bookdown:
name: Render-Book
runs-on: macOS-latest
steps:
- uses: actions/checkout@v4
with:
ref: gh-pages
- 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","HelpersMG","readr"))'
- uses: r-lib/actions/setup-tinytex@v2
- name : install tinytex
run: tlmgr --version
- name: Render Book
run: |
Rscript -e 'bookdown::render_book("index.Rmd", "bookdown::gitbook", output_dir="docs")'
- uses: actions/upload-artifact@v4
with:
name: docs/renderbook_output
path: docs/
# deploy to gh pages yml
build-and-deploy:
runs-on: ubuntu-latest
needs: bookdown
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Download Artifacts 🔻 # The built project is downloaded into the 'site' folder.
uses: actions/download-artifact@v4
with:
name: docs/renderbook_output
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: docs/renderbook_output
target-folder: docs/renderbook_output # The folder the action should deploy.
clean: true