Fetch relevant article figures monthly #18
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: Fetch relevant article figures monthly | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 1 * *" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
fetch-pmc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: main | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install libcurl4-openssl-dev | |
Rscript -e 'install.packages(c("utils","httr","xml2","dplyr","magrittr","stringr","purrr","yaml","rvest","lubridate","jpeg"))' | |
- name: Run fetch_pmc.R | |
run: | | |
Rscript -e "source('scripts/fetch_pmc.R')" | |
- name: Commit to inbox | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: new content from pmc |