Skip to content

Merge pull request #78 from chhoumann/p9-presentation-introduction-fe… #12

Merge pull request #78 from chhoumann/p9-presentation-introduction-fe…

Merge pull request #78 from chhoumann/p9-presentation-introduction-fe… #12

name: Quarto Publish P9 Presentation
on:
push:
branches:
- main
paths:
- 'p9-presentation/**'
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- 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/main
- name: Render with Quarto
working-directory: p9-presentation
run: quarto render
- name: Commit and push
working-directory: p9-presentation
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 }}