Skip to content

Quarto Publish P9 Presentation #1

Quarto Publish P9 Presentation

Quarto Publish P9 Presentation #1

name: Quarto Publish
on:
push:
branches:
- master
paths:
- 'p9-presentation/**'
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Quarto
run: |
wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.3.450/quarto-1.3.450-linux-amd64.deb
sudo dpkg -i quarto-1.3.450-linux-amd64.deb
rm quarto-1.3.450-linux-amd64.deb
- name: Setup Git
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- name: Checkout publish branch
run: |
git fetch origin publish:refs/remotes/origin/publish
git checkout -b publish --track origin/publish || git checkout publish
git reset --hard origin/master
- name: Render with Quarto
run: quarto render
- name: Commit and push
run: |
git add -f publish
git commit -m "Update Quarto render" || echo "No changes to commit"
git push origin publish -f
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}