Google Reports #121
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: "Google Reports" | |
on: | |
schedule: | |
- cron: '0 5,6,17,18 * * *' | |
jobs: | |
update-google-reports: | |
name: Update Google Reports | |
runs-on: ubuntu-20.04 | |
permissions: | |
contents: write | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: 'release' | |
- name: Setup - Checkout repo | |
uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
cache-version: 1 | |
needs: | | |
any::tidyverse | |
any::httr | |
any::remotes | |
any::shiny | |
any::scales | |
any::treemap | |
any::here | |
any::jsonlite | |
any::janitor | |
any::quarto | |
any::highcharter | |
any::lubridate | |
any::gt | |
any::gtExtras | |
any::pacman | |
any::openxlsx | |
any::sf | |
any::xml2 | |
any::rvest | |
any::reticulate | |
any::fs | |
any::countrycode | |
any::progress | |
any::cli | |
any::digest | |
any::glue | |
any::vroom | |
any::prettydoc | |
any::DT | |
- name: Apt-get update things | |
run: | | |
sudo apt-get update | |
- name: Apt-get needed things | |
run: | | |
sudo apt-get install --no-install-recommends -y \ | |
libssl-dev \ | |
libcurl4-openssl-dev \ | |
libxml2-dev \ | |
libharfbuzz-dev \ | |
libfribidi-dev | |
- run: echo "🍏 This job's status is ${{ job.status }}." | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.x' # Choose the appropriate Node.js version | |
- name: Install dependencies | |
run: npm ci | |
- name: Install playwright browsers | |
run: npx playwright install --with-deps | |
- name: "Check Playwright CLI" | |
run: npx playwright --version | |
- name: "Install Packages" | |
run: | | |
remotes::install_github("benjaminguinaudeau/playwrightr", force = T) | |
shell: Rscript {0} | |
- name: Pull Latest Changes | |
run: git pull origin main | |
- name: "Script - Google Run" | |
run: Rscript 'selenium.R' | |
- name: "Commit" | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Retrieve Google Reports |