-
-
Notifications
You must be signed in to change notification settings - Fork 70
59 lines (50 loc) · 1.56 KB
/
cd-preview-build.yaml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Name used in ./cd-preview-deploy.yaml
name: CD - Preview Build
on:
pull_request:
types: [opened, synchronize]
jobs:
build-app-preview:
runs-on: ubuntu-latest
name: Build app and upload build artifact
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 22
corepack: true
cache: 'pnpm'
- name: Install dependencies
run: pnpm i
- name: Build the app
run: pnpm -F @enclosed/deploy-cloudflare build
# Uploads the build directory as a workflow artifact
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: preview-app-build
if-no-files-found: error
path: packages/deploy-cloudflare/dist
build-docs-preview:
runs-on: ubuntu-latest
name: Build docs and upload build artifact
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 22
corepack: true
cache: 'pnpm'
- name: Install dependencies
run: pnpm i
- name: Build the docs
run: pnpm -F @enclosed/docs build
# Uploads the build directory as a workflow artifact
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: preview-docs-build
if-no-files-found: error
path: packages/docs/dist