-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.43 KB
/
publish_p9_presentation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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 }}