Combine all model outputs and target data #12
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: Combine all model outputs and target data | |
on: | |
schedule: | |
#Sunday at 1:00 AM | |
- cron: '0 1 * * 0' | |
workflow_dispatch: | |
jobs: | |
run-r-script: | |
runs-on: self-hosted #ubuntu-22.04 | |
env: | |
GITHUB_PAT: ${{ secrets.PERSONAL_GITHUB_TOKEN }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# - name: Set up R | |
# uses: r-lib/actions/setup-r@v2 | |
# with: | |
# use-public-rspm: true | |
# - name: Install R packages | |
# run: | | |
# Rscript -e "install.packages(c('lubridate', 'dplyr', 'readr', 'tidyr', 'MMWRweek'))" | |
- name: Run all_model_output_and_target_data.R script | |
run: | | |
Rscript scripts/all_model_output_and_target_data.R | |
- name: Add new files | |
run: git add auxiliary-data/ | |
- name: Commit results | |
run: | | |
git config --local user.name "$GITHUB_ACTOR" | |
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
git commit -am 'added auxiliary data' || echo "No changes to commit" | |
- name: Push changes with personal token | |
env: | |
GITHUB_PAT: ${{ secrets.PERSONAL_GITHUB_TOKEN }} | |
run: | | |
git push https://${{ secrets.PERSONAL_GITHUB_TOKEN }}@github.com/ai4castinghub/hospitalization-forecast.git HEAD:main || echo "No changes to commit" |