Skip to content

Merge pull request #3 from rOpenSpain/dependabot/github_actions/actio… #9

Merge pull request #3 from rOpenSpain/dependabot/github_actions/actio…

Merge pull request #3 from rOpenSpain/dependabot/github_actions/actio… #9

Workflow file for this run

on:
push:
branches:
- main
- master
workflow_dispatch:
name: render-xaringan
jobs:
render-xaringan:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- name: Restore R package cache
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
- name: Install dependencies
run: |
install.packages('remotes')
remotes::install_cran(c("xaringan", "knitr", "rmarkdown", "tidyverse", "DT", "leaflet", "mapSpain"), dependencies = TRUE, type="binary")
shell: Rscript {0}
- name: Render
run: |
rmarkdown::render('index.Rmd')
shell: Rscript {0}
- name: Commit results
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m 'Update xaringan' || echo "No changes to commit"
git push origin || echo "No changes to commit"