Update publications #60
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: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 5 1 * *' | |
name: Update publications | |
jobs: | |
update-bibtex: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
install-r: false | |
use-public-rspm: true | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libcurl4-openssl-dev | |
- uses: r-lib/actions/setup-renv@v2 | |
- name: Create bibtex file with selected entries | |
run: | | |
gh_repository <- "${{ github.repository }}" | |
source("snippets/update_publications.R") | |
shell: Rscript {0} | |
- uses: peter-evans/create-pull-request@v7 | |
id: cpr | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: Automated update of team publications | |
committer: epiforecasts-bot <[email protected]> | |
author: epiforecasts-bot <[email protected]> | |
branch: pubs | |
branch-suffix: timestamp | |
add-paths: _data/papers.bib | |
title: Automated update of team publications | |
delete-branch: true | |
fetch-new-papers: | |
needs: update-bibtex | |
if: always() | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
install-r: false | |
use-public-rspm: true | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libcurl4-openssl-dev | |
- uses: r-lib/actions/setup-renv@v2 | |
- name: Post a comment listing new papers | |
run: | | |
gh_repository <- "${{ github.repository }}" | |
source("snippets/post_publications.R") | |
shell: Rscript {0} |