dashboard #48
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: | |
schedule: | |
- cron: '0 1 * * *' | |
#push: | |
# branches: | |
# - main | |
workflow_dispatch: | |
name: dashboard | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
container: eco4cast/rocker-neon4cast:latest | |
steps: | |
- run: git config --system --add safe.directory '*' | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
set-safe-directory: '*' | |
- name: install deps | |
shell: Rscript {0} | |
run: remotes::install_deps(".", dep=TRUE) | |
- uses: quarto-dev/quarto-actions/setup@v2 | |
with: | |
version: 1.4.146 | |
- name: pull scores cache | |
shell: Rscript {0} | |
run: source("dashboard/cache.R") | |
#- name: Cache scores | |
# id: cache-scores | |
# uses: actions/cache@v3 | |
# with: | |
# path: cache | |
# key: ${{ runner.os }}-cache | |
- name: Render | |
run: | | |
quarto render dashboard | |
- name: Build site map | |
shell: Rscript {0} | |
run: source("dashboard/build_site_map.R") | |
- name: Publish | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git checkout gh-pages | |
cp -r dashboard/docs/* . | |
git add . | |
git commit -a -m "update pages" || echo "nothing to commit" | |
git push https://${GITHUB_PAT}:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY} | |