Skip to content

Update deploy.yml

Update deploy.yml #2

Workflow file for this run

# .github/workflows/deploy.yml
name: Deploy Quarto Website
# Run on pushes to the main branch and allow manual runs
on:
push:
branches: [main] # Or master, depending on your default branch name
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read # Need read to check out the code
pages: write # Need write to deploy to GitHub Pages
id-token: write # Need for OIDC token authentication for deployment
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-and-deploy:
runs-on: ubuntu-latest # Use the latest Ubuntu runner
steps:
- name: Checkout repository
uses: actions/checkout@v4 # Checks out your repository code
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
# Optional: Specify a Quarto version, or leave blank for latest
# version: 1.4.549
version: latest
# Optional: Add steps here to install R, Python, or other dependencies
# if your Quarto documents require code execution.
# Example for Python:
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: '3.11' # Specify your Python version
# - name: Install Python dependencies
# run: pip install -r requirements.txt # If you have a requirements file
- name: Render Quarto Website
run: quarto render # Renders the website, output goes to docs/
- name: Setup Pages
id: pages # Used for referencing outputs later
uses: actions/configure-pages@v5 # Configures GitHub Pages options
- name: Upload artifact
uses: actions/upload-pages-artifact@v3 # Uploads the rendered site content
with:
# Upload the entire contents of the output directory
path: ./docs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # Deploys the artifact to GitHub Pages
# This action automatically handles authentication using the GITHUB_TOKEN