Update external resources #1197
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: Update external resources | |
on: | |
schedule: | |
# Run every day at 00:00 | |
- cron: '0 0 * * *' | |
# Enable manually updating the external resources | |
workflow_dispatch: | |
jobs: | |
update_external_resources: | |
name: Update external resources | |
runs-on: ubuntu-latest | |
steps: | |
# Scheduled workflows run on the default branch | |
- name: Checkout external-resources branch | |
uses: actions/checkout@v2 | |
with: | |
ref: external-resources | |
- name: Install environment # Use mamba as in https://github.com/conda-incubator/setup-miniconda/issues/274 and https://github.com/conda-incubator/setup-miniconda#example-10-miniforge | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: covid19 | |
environment-file: environment.yml | |
auto-activate-base: false | |
miniforge-variant: Mambaforge | |
channels: conda-forge | |
channel-priority: true | |
use-mamba: true | |
- name: List information about mamba and environment | |
shell: bash --login {0} | |
run: | | |
mamba info | |
mamba list | |
mamba config --show-sources | |
mamba config --show | |
printenv | sort | |
- name: Update JHU CSSE data | |
shell: bash --login {0} | |
run: bash csse/generate-csse-stats.sh | |
- name: Update EBM Data Lab data | |
shell: bash --login {0} | |
run: bash ebmdatalab/generate-ebmdatalab-stats.sh | |
- name: Update OWID data | |
shell: bash --login {0} | |
run: bash owiddata/generate-owiddata-stats.sh | |
- name: Update CORD-19 data | |
shell: bash --login {0} | |
run: bash CORD-19/generate-cord19-stats.sh | |
# - name: Update manuscript statistics data | |
# shell: bash --login {0} | |
# run: bash analyze-ms-stats/calc-manuscript-stats.sh | |
- name: Commit JHU CSSE, EBM Data Lab, OWID, CORD-19, and manuscript growth figures | |
uses: EndBug/add-and-commit@v4 | |
with: | |
add: '*/*.png */*.svg */*/*.png */*/*.svg' | |
author_name: GitHub Actions | |
author_email: [email protected] | |
message: 'Update JHU CSSE, EBM Data Lab, OWID, CORD-19, and manuscript growth figures' | |
ref: external-resources | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update figure versions | |
shell: bash --login {0} | |
run: bash version-figures.sh | |
- name: Commit JHU CSSE, EBM Data Lab, OWID, CORD-19, and manuscript growth statistics | |
uses: EndBug/add-and-commit@v4 | |
with: | |
add: '*/*.json' | |
author_name: GitHub Actions | |
author_email: [email protected] | |
message: 'Update JHU CSSE, EBM Data Lab, OWID, CORD-19, and manuscript growth statistics' | |
ref: external-resources | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |