Skip to content

Update & Deploy dashboard #566

Update & Deploy dashboard

Update & Deploy dashboard #566

on:
schedule:
- cron: '0 12 * * *'
push:
branches:
- main
workflow_dispatch:
name: Update & Deploy dashboard
jobs:
docker:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
container: rocker/geospatial:latest
steps:
- run: git config --system --add safe.directory '*'
- uses: actions/checkout@v3
with:
fetch-depth: 0
set-safe-directory: '*'
- uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.4.146
- name: install deps
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
shell: Rscript {0}
run: remotes::install_deps(".", dep=TRUE)
- name: preload
run: |
R -e 'source("cache.R")'
- name: Render
run: |
quarto render
- name: Publish
run: |
git config user.name github-actions
git config user.email [email protected]
git checkout gh-pages
cp -r docs/* .
git add .
git commit -a -m "update pages" || echo "nothing to commit"
git push https://${GITHUB_PAT}:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}
- name: ping healthchecks
run: |
R -e 'df <- curl::curl_fetch_memory("https://hc-ping.com/ac0e5986-003b-4762-ab2a-2ee3d117fd4c")'