Build Site #150
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
on: | |
push: | |
branches: main | |
pull_request: | |
branches: main | |
schedule: | |
# * is a special character in YAML, so you have to quote this string | |
# Trigger once a week, on a Sunday (0) | |
- cron: '0 0 * * 0' | |
workflow_dispatch: | |
name: Build Site | |
jobs: | |
build-website: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Quarto CLI | |
uses: quarto-dev/quarto-actions/install-quarto@v1 | |
- name: Install libcurl | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libcurl4-openssl-dev | |
- name: Put pandoc in PATH | |
run: | | |
mkdir -p ~/.local/bin | |
ln -s $(dirname $(readlink -f $(which quarto)))"/pandoc" ~/.local/bin/pandoc | |
shell: bash | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
# - name: Set up renv | |
# uses: r-lib/actions/setup-renv@v2 | |
# with: | |
# cache-version: 2 | |
- name: Build site 🔧 | |
run: | | |
R -e 'install.packages("tidyverse"); install.packages("patchwork"); install.packages(c("MPTinR", "effectsize", "ggpubr", "afex", "emmeans", "papaja")); install.packages("quarto"); install.packages("countdown"); install.packages("rempsyc"); install.packages("flextable"); quarto::quarto_render(".", as_job = FALSE)' | |
- name: Deploy 🚀 | |
if: github.event_name != 'pull_request' | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: _site # The folder the action should deploy. |