-
Notifications
You must be signed in to change notification settings - Fork 1.5k
45 lines (39 loc) · 1.36 KB
/
build-and-preview-site.yml
File metadata and controls
45 lines (39 loc) · 1.36 KB
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: Build and Preview Site
on:
pull_request:
branches: [master]
types: [opened, synchronize, reopened]
jobs:
site-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@master
with:
persist-credentials: false
fetch-depth: 1
- name: Install 🔧
run: make setup
- name: Build 🏗️
# Always run the full production build explicitly.
# Do NOT use `make clean` here — that target is a developer convenience
# command whose recipe has changed multiple times, causing blog posts and
# other collections to be silently excluded from the deployed site when
# it ran a lite/dev build instead of the full production build.
# `npm run build` is the canonical, stable production build command:
# cross-env BUILD_FULL_SITE=true gatsby build
run: npm run build
- name: Broken Link Check 🔗
uses: technote-space/broken-link-checker-action@v2
with:
target: ./public/**/*.html
- name: Zip Site
run: bash ./script.sh
- name: Upload files
uses: actions/upload-artifact@v6
with:
name: public-dir
path: ./public-dir.zip
retention-days: 1
- name: Trigger Inner workflow
run: echo "triggering inner workflow"