make_cron #2473
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: make_cron | |
on: | |
push: | |
branches: [master] | |
schedule: | |
- cron: "30 14 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -y libcurl4-openssl-dev fonts-ebgaramond libharfbuzz-dev libfribidi-dev | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
- name: renv cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.local/share/renv | |
key: ${{ runner.os }}-renv-v3-${{ hashFiles('**/renv.lock') }} | |
restore-keys: | | |
${{ runner.os }}-renv-v3- | |
- name: targets cache | |
uses: actions/cache@v3 | |
with: | |
path: _targets | |
key: ${{ runner.os }}-targets-v3-${{ hashFiles('**/cache.log') }} | |
restore-keys: | | |
${{ runner.os }}-targets-v3- | |
- name: renv | |
shell: Rscript {0} | |
run: | | |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv") | |
renv::restore() | |
- name: build | |
run: Rscript -e 'targets::tar_make()' | |
- name: push | |
run: | | |
git config --global user.name 'Adam Altmejd' | |
git config --global user.email '[email protected]' | |
git add --all | |
git commit --allow-empty -m "Github Action autocommit" | |
git push |