update-data #540
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: update-data | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 1 * * *' | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: fregante/setup-git-user@v1 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Run Script | |
run: | | |
sudo apt install -y libcurl4-openssl-dev libxml2-dev libfontconfig1-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev libssl-dev libmagick++-dev libv8-dev libnode-dev libudunits2-dev libgdal-dev libprotobuf-dev libjq-dev protobuf-compiler libprotobuf-dev libprotoc-dev libpoppler-cpp-dev libarchive-dev | |
Rscript -e "install.packages('usethis', dependencies=TRUE)" | |
Rscript -e "install.packages('tidyverse')" | |
Rscript -e "install.packages('lubridate')" | |
Rscript -e "install.packages('httr')" | |
Rscript -e "install.packages('jsonlite')" | |
Rscript "get-data.R" | |
- name: Commit files | |
run: | | |
git config --local user.email "actions@github.com" | |
git config --local user.name "GitHub Actions" | |
git add --all | |
git commit -am "update data" || echo "No changes to commit" | |
git push || echo "No changes to commit" |