book-weekly #42
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: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 13 * * 2" | |
name: book-weekly | |
jobs: | |
book-weekly: | |
runs-on: ubuntu-latest | |
env: | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- id: setup | |
uses: r-lib/actions/setup-r@v2 | |
- uses: quarto-dev/quarto-actions/setup@v2 | |
with: | |
tinytex: true | |
- name: Install headless chromium | |
run: quarto tools install chromium | |
- name: Cache R packages | |
uses: pat-s/always-upload-cache@v3 | |
with: | |
path: ~/.cache/R/renv | |
key: ${{ runner.os }}-r-${{ steps.setup.outputs.installed-r-version }}-weekly-lock-${{ hashFiles('book/renv.lock') }} | |
restore-keys: ${{ runner.os }}-r-${{ steps.setup.outputs.installed-r-version }}-weekly-lock- | |
- name: Install System Dependencies | |
uses: mlr-org/actions/renv-system-dependencies@v1 | |
with: | |
path: 'book/renv.lock' | |
- name: Restore renv environment | |
run: | | |
cd book | |
R -q -e 'options(Ncpus = 2); install.packages("renv", repos = "cloud.r-project.org"); renv::restore()' | |
- name: Update renv environment | |
run: | | |
cd book | |
R -q -e 'renv::update(prompt = FALSE)' | |
- name: Restore OpenML cache | |
uses: actions/cache/restore@v3 | |
id: restore-openml-cache | |
with: | |
path: book/openml | |
key: ${{ runner.os }}-openml-${{ hashFiles('./book/chapters/chapter11/large-scale_benchmarking.qmd') }}-${{hashFiles('./book/chapters/appendices/solutions.qmd')}} | |
restore-keys: ${{ runner.os }}-openml- | |
- name: Render book | |
run: quarto render book/ --cache-refresh | |
- name: Save OpenML cache | |
uses: actions/cache/save@v3 | |
id: save-openml-cache-manual | |
with: | |
path: book/openml | |
key: ${{ runner.os }}-openml-${{ hashFiles('./book/chapters/chapter11/large-scale_benchmarking.qmd') }}-${{hashFiles('./book/chapters/appendices/solutions.qmd')}} |