Skip to content

update actions yml to use docker and cacheing #3

update actions yml to use docker and cacheing

update actions yml to use docker and cacheing #3

Workflow file for this run

name: Build Documentation
on:
push:
branches:
- main
- test-github-actions
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
container:
image: rocker/verse:latest
steps:
- name: Checkout code
uses: actions/checkout@v3
# Add cache for R packages
- name: Cache R packages
uses: actions/cache@v3
with:
path: /usr/local/lib/R/site-library
key: ${{ runner.os }}-r-${{ hashFiles('**/DESCRIPTION') }}
restore-keys: |
${{ runner.os }}-r-
# Add cache for APT packages
- name: Cache APT packages
uses: actions/cache@v3
with:
path: /var/cache/apt/archives
key: ${{ runner.os }}-apt-${{ hashFiles('**/build-docs.yml') }}
- name: Install LaTeX
run: |
apt-get update
apt-get install -y texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-xetex
- name: Install R packages
run: |
Rscript -e 'install.packages(c("rmarkdown", "tools", "utils"))'
- name: Run Makefile
working-directory: assignments
run: |
make all