Skip to content

Build and Deploy Quarto Site #12

Build and Deploy Quarto Site

Build and Deploy Quarto Site #12

name: Build and Deploy Quarto Site
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: revamp-organization
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
# only need if using R analyses in quarto
# - name: Install dependencies
# run: |
# sudo apt-get install -y pandoc libxml2-dev
# Rscript -e 'install.packages("quarto", lib = "/tmp")' # Install quarto in /tmp
# Rscript -e '.libPaths(c("/tmp", .libPaths())); library(quarto)' # Set library path
# - name: Render Quarto Project
# run: quarto render
#
# - name: Deploy to GitHub Pages
# uses: peaceiris/actions-gh-pages@v4
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# cname: projects.ecoforecast.org
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
publish_dir: ./docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}