Skip to content

Commit 46b99b0

Browse files
authored
split jelles PR into two (#29)
1 parent f5f9bdf commit 46b99b0

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/build.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
name: Render and Publish Quarto Site
7+
8+
permissions:
9+
contents: write
10+
pages: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Check out repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Quarto
21+
uses: quarto-dev/quarto-actions/setup@v2
22+
env:
23+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Render Quarto project
26+
run: |
27+
quarto render
28+
29+
- name: Copy static assets to docs folder
30+
run: |
31+
cp -R images/* docs/images/
32+
33+
- name: Upload HTML files as artifact
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: quarto-html-output
37+
path: docs/**/*.html
38+
39+
- name: Commit and push specific files
40+
run: |
41+
git config --global user.name "github-actions[bot]"
42+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
43+
44+
git add docs/index.html
45+
git add docs/simulation.html
46+
git add docs/ASReviewLAB.html
47+
git add docs/datatools.html
48+
49+
git add docs/images/
50+
51+
if git diff --cached --quiet; then
52+
echo "No changes to commit."
53+
else
54+
git commit -m "Update Quarto files"
55+
git push origin main
56+
fi
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)