Skip to content

Commit

Permalink
update actions yml to use docker and cacheing
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasostling committed Dec 18, 2024
1 parent f757d51 commit 323f586
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,40 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container:
image: rocker/verse:latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up R environment
uses: r-lib/actions/setup-r@v2
# 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: |
sudo apt-get update
sudo apt-get install -y texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-xetex
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"))'
- name: Install Sweave (if not included)
run: |
Rscript -e 'install.packages("utils")'
Rscript -e 'install.packages(c("rmarkdown", "tools", "utils"))'
- name: Run Makefile
working-directory: IntroML/assignments
working-directory: assignments
run: |
make all

0 comments on commit 323f586

Please sign in to comment.