Skip to content

Quarto Publish

Quarto Publish #611

Workflow file for this run

on:
workflow_dispatch:
schedule:
- cron: '0 20 * * *'
push:
branches: main
name: Quarto Publish
jobs:
build-deploy:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
container: rocker/geospatial:latest
permissions:
contents: write
steps:
- run: git config --system --add safe.directory '*'
- uses: actions/checkout@v4
with:
fetch-depth: 0
set-safe-directory: '*'
- name: Install packages
shell: Rscript {0}
run: source('install.R')
#- uses: quarto-dev/quarto-actions/setup@v2
# #with:
# version: 1.4.146
- name: Render
run: |
quarto render
- name: Update data
run: |
git config user.name github-actions
git config user.email [email protected]
git add data/saved_parameter_chain.csv
git add data/site_carbon_data.csv
git add data/PF_analysis_0.Rdata
git add data/PF_analysis_1.Rdata
git commit -a -m "update data" || echo "nothing to commit"
git push https://${GITHUB_PAT}:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}
- name: Publish
run: |
git config user.name github-actions
git config user.email [email protected]
git checkout gh-pages
cp -r _book/* .
git add .
git commit -a -m "update pages" || echo "nothing to commit"
git push https://${GITHUB_PAT}:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}