Skip to content

20230705 - github actions #1

20230705 - github actions

20230705 - github actions #1

# From: https://orchid00.github.io/actions_sandbox/websites-using-pkgdown-bookdown-and-blogdown.html#deploy-bookdown
on:
push:
branches:
- main
name: main
jobs:
bookdown:
name: Render-Book
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3 # update
- name: Setup R
uses: r-lib/actions/setup-r@v2 # update
- name: Session info
run: Rscript -e 'sessionInfo()'
- name: Setup pandoc
uses: r-lib/actions/setup-pandoc@v2 # update
- name: Install libcurl on Linux
if: runner.os == 'Linux'
run: sudo apt-get update -y && sudo apt-get install -y libcurl4-openssl-dev
- name: Install tinytex
uses: r-lib/actions/setup-tinytex@v2 # update
#- name: Install additional LaTeX packages
# run: |
#tlmgr install url
#tlmgr install underscore
- name: Install Google fonts
run: |
wget -O Source_Code_Pro.zip https://fonts.google.com/download?family=Source%20Code%20Pro
unzip -d source_code_pro/ Source_Code_Pro.zip
mv source_code_pro /usr/share/fonts/
fc-cache -fv
- name: Install package dependencies
uses: r-lib/actions/setup-r-dependencies@v2 # update
#- name: Install remote packages
# run: |
# Rscript -e 'remotes::install_github("DevPsyLab/petersenlab")'
- name: Render Book
run: Rscript -e 'bookdown::render_book("index.Rmd", output_format = c("all"))'
- uses: actions/upload-artifact@v3 # update
with:
name: _book
path: _book/