new post #65
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 | |
# to be able to trigger a manual build | |
workflow_dispatch: | |
name: Render and deploy Blog | |
env: | |
RENV_PATHS_ROOT: ~/.local/share/renv | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# had issue with "curl". | |
# https://github.com/r-lib/actions/issues/416 | |
- name: Install curl command | |
run: sudo apt-get install -y libcurl4-openssl-dev | |
- name: Install Quarto | |
uses: quarto-dev/quarto-actions/install-quarto@v1 | |
# with: | |
# To install LaTeX to build PDF book | |
# tinytex: true | |
# uncomment below and fill to pin a version | |
# version: 0.9.105 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: '4.1.1' # The R version to download (if necessary) and use. | |
- uses: r-lib/actions/setup-renv@v2 | |
# - name: Cache packages | |
# uses: actions/cache@v1 | |
# with: | |
# path: ${{ env.RENV_PATHS_ROOT }} | |
# key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }} | |
# restore-keys: | | |
# ${{ runner.os }}-renv- | |
# | |
# - name: Restore packages | |
# shell: Rscript {0} | |
# run: | | |
# if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv") | |
# renv::restore() | |
- name: Render blog | |
run: | | |
quarto render | |
- name: Push rendered code | |
uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions |