Skip to content

Commit 113a608

Browse files
authored
CI: add action to check PR and upload artifact (#41)
1 parent 27b510e commit 113a608

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/pr-check.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Quarto PR Check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
14+
steps:
15+
- name: Check out repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Quarto
19+
uses: quarto-dev/quarto-actions/setup@v2
20+
with:
21+
version: "1.6.42"
22+
23+
- name: Render Quarto Project
24+
uses: quarto-dev/quarto-actions/render@v2
25+
26+
- name: Check if rendering succeeded
27+
run: |
28+
# Ensure the site folder is created
29+
if [ ! -d "docs" ]; then
30+
echo "Rendering failed: docs folder does not exist."
31+
exit 1
32+
fi
33+
34+
- name: Upload static files as artifact
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: rendered-site
38+
path: docs/

0 commit comments

Comments
 (0)