Quarto Publish P9 Presentation #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@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/main | |
- 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 }} |