Skip to content

Daily update

Daily update #297

on:
schedule:
- cron: "0 5 * * *"
workflow_dispatch:
name: Daily update
jobs:
run-r-script:
name: update data
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
ref: deploy
- name: Run R scripts in Docker
run: |
docker run --volume ${{ github.workspace }}:/workspace --workdir /workspace ofbidf/r_prr_onde:latest bash -c "
Rscript '01_verifier_maj.R'
Rscript '02_telechargement_data.R'
Rscript '03_preparer_data.R'
Rscript '04_preparer_graphiques.R'
Rscript '05_generer_rapport_html.R'
"
- name: Commit Results
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git add .
git commit -m "Results $(date)" || echo "No changes to commit"
git push origin -f || echo "No changes to commit"