Using cache #8
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
name: Website | |
on: | |
push: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: rocker/r2u:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
name: Cache R packages | |
id: cache-r-packages | |
with: | |
path: '/usr/local/lib/R/site-library/' | |
key: ${{ runner.os }} | |
- name: Install netdiffuseR | |
if: steps.cache-r-packages.outputs.cache-hit != 'true' | |
uses: actions/checkout@v4 | |
with: | |
repository: USCCANA/netdiffuseR | |
path: netdiffuseR | |
- name: Install netdiffuseR | |
if: steps.cache-r-packages.outputs.cache-hit != 'true' | |
run: | | |
install2.r igraph networkDynamic statnet Rcpp MatchIt \ | |
SparseM viridisLite RcppArmadillo rmarkdown knitr microbenchmark | |
R CMD INSTALL netdiffuseR | |
rm -rf netdiffuseR | |
- name: Install Quarto | |
run: | | |
wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.6.37/quarto-1.6.37-linux-amd64.deb | |
dpkg -i quarto-1.6.37-linux-amd64.deb | |
- name: Build website | |
run: | | |
quarto render . | |