Scrape OCMD RTWB website #241
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: Scrape OCMD RTWB website | |
# https://crontab.guru/ | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 11 * * *' | |
permissions: | |
contents: write | |
jobs: | |
scrape_it: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
GDRIVE_PAT: ${{ secrets.GDRIVE_PAT }} | |
steps: | |
- name: Check out GH repository | |
uses: actions/checkout@v3 | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Install packages | |
uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
packages: | | |
any::googlesheets4 | |
any::rvest | |
any::dplyr | |
any::tidyr | |
any::lubridate | |
- name: Scrape number reviewed | |
run: Rscript "scheduled_code/scrape_rtwb.R" | |
- name: Scrape daily occurrence | |
run: Rscript "scheduled_code/daily_occurrence_scraper.R" | |
- name: Keep GH action alive if no commit in 50 days | |
uses: gautamkrishnar/keepalive-workflow@v1 | |