Skip to content

.github/workflows/update.yml #12

.github/workflows/update.yml

.github/workflows/update.yml #12

Workflow file for this run

on:
schedule:
- cron: '0 7 * * 1' # Every Monday at 8 AM GMT
jobs:
update-dashboard:
runs-on: ubuntu-latest
permissions:
contents: write
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- name: Set up R
uses: r-lib/actions/setup-r@v2
- name: Install packages
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: |
any::lubridate
any::gh
any::reactable
- name: Check out repository
uses: actions/checkout@v4
- name: Import data
run: Rscript import.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 'Data updated' || echo "No changes to commit"
git push
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}