Skip to content

Commit

Permalink
Add website publishing to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jteijema committed Aug 26, 2024
1 parent a6c653f commit cf1aaed
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions _quarto.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
name: Build Quarto Document

on:
push:
branches:
- main
pull_request:
branches:
- main

name: Render and Publish Quarto Site

permissions:
contents: write
pages: write

jobs:
build:
build-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Render Quarto documents
run: |
quarto render
- name: Render Quarto project
run: |
quarto render
- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add docs/
git commit -m "Build HTML Files (GitHub Action)"
git push
- name: Publish to GitHub Pages
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit cf1aaed

Please sign in to comment.