Skip to content

update-data

update-data #426

Workflow file for this run

# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
push:
branches:
- main
schedule:
- cron: "0 6 * * 0"
workflow_dispatch:
name: update-data
jobs:
update-data:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.PAT }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
extra-packages: |
any::pkgload
any::rmarkdown
any::ggplot2
any::dplyr
any::writexl
local::.
any::rcmdcheck
- name: Check
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
shell: Rscript {0}
- name: Update data
run: |
Rscript "data-raw/update.R"
- name: Update README
run: rmarkdown::render("README.Rmd", "github_document")
shell: Rscript {0}
- name: Commit results
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add README.md
git add man/figures/README-grafico-1.png
git commit -m 'Update data' || echo "No changes to commit"
git push origin || echo "No changes to commit"