update-data #1571
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: | |
schedule: | |
- cron: "15 12 * * *" | |
workflow_dispatch: | |
name: update-data | |
jobs: | |
render: | |
name: update-data | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: | | |
any::pkgload | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- name: Execute Script | |
run: | | |
Rscript data-raw/actions-update-data.R | |
- name: Commit results | |
run: | | |
git config --local user.email "actions@github.com" | |
git config --local user.name "GitHub Actions" | |
git add data/mananciais.rda | |
git add inst/extdata/mananciais.csv | |
git add README.md | |
git add README.Rmd | |
git add docs/index.html | |
git add inst/extdata/mananciais.xlsx | |
git commit -m 'Update data' || echo "Update data" | |
git push origin || echo "Update data" |