imf_lic_dsa_scraper #66
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: "30 12 * * SUN" # Sunday at 13:22 UTC, 9:22 Eastern Daylight Time | |
workflow_dispatch: | |
name: imf_lic_dsa_scraper | |
jobs: | |
run-r-script: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
packages: | | |
any::tidyverse | |
any::lubridate | |
any::pdftools | |
any::countrycode | |
any::janitor | |
any::here | |
- name: Execute Script | |
run: | | |
Rscript "scripts/imf_lic_dsa_pdf_scraper.R" | |
- name: Commit results | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git add . | |
git commit -m "Results from R script" || echo "No changes to commit" | |
git push origin || echo "No changes to commit"- |