Skip to content

dashboard

dashboard #312

Workflow file for this run

on:
schedule:
- cron: '0 8 * * *'
#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: Staging data
shell: Rscript {0}
run: source("dashboard/stage_data.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}