Skip to content

Commit 789b8e6

Browse files
Build the preview site so there's a viewable site, and then publish it so the surge preview can use it (quarkiverse#16)
1 parent 5134a56 commit 789b8e6

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,25 @@ jobs:
3030
id: build_bundle
3131
run: gulp bundle
3232

33+
# Build the Antora preview (ends up in ./public)
34+
- name: Build preview
35+
# Only support previews on PRs
36+
if: "github.event_name == 'pull_request'"
37+
id: build_preview
38+
run: gulp preview:build
39+
40+
- name: Store PR id
41+
if: "github.event_name == 'pull_request'"
42+
run: echo ${{ github.event.number }} > ./public/pr-id.txt
43+
44+
- name: Publishing directory for PR preview
45+
if: "github.event_name == 'pull_request'"
46+
uses: actions/upload-artifact@v2
47+
with:
48+
name: site
49+
path: ./public
50+
retention-days: 3
51+
3352
- name: Publish bundle
3453
uses: ncipollo/release-action@v1
3554
# Only try and deploy on merged code

0 commit comments

Comments
 (0)