rerun-everything #4
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
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples | |
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | |
on: | |
schedule: | |
# run at the beginning of every year | |
- cron: '0 0 1 3 *' | |
name: rerun-everything | |
jobs: | |
rerun-everything: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
R_KEEP_PKG_SOURCE: yes | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Get raw data from NEON | |
env: | |
NEON_TOKEN: ${{ secrets.NEON_TOKEN }} | |
run: | | |
Rscript -e 'source("data-raw/01_download_data_using_ecocomDP.r")' | |
Rscript -e 'source("data-raw/01_download_data_using_ecocomDP.r")' | |
- name: Commit results | |
run: | | |
git config --local user.name "$GITHUB_ACTOR" | |
git config --local user.email "[email protected]" | |
git commit -am 'Re-build neon diversity data' || echo "No changes to commit" | |
git push origin || echo "No changes to commit" |