forked from holistics/dbml
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (55 loc) · 1.92 KB
/
Copy pathbuild-docs.yml
File metadata and controls
68 lines (55 loc) · 1.92 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build DBML Homepage with Playground
on:
pull_request:
branches:
- master
paths:
- 'dbml-homepage/**'
- 'dbml-playground/**'
jobs:
build:
name: Build Homepage and Playground
runs-on: blacksmith-2vcpu-ubuntu-2204
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup Node environment
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Cache root node_modules
uses: actions/cache@v4
with:
path: |
node_modules
.yarn/cache
key: ${{ runner.os }}-yarn-root-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-root-
- name: Install dependencies (root)
run: yarn install --frozen-lockfile
- name: Build the @dbml/parse package
run: yarn workspace @dbml/parse build
- name: Build the @dbml/core package
run: NODE_OPTIONS="--max-old-space-size=8192" yarn workspace @dbml/core build
- name: Build playground
run: NODE_OPTIONS="--max-old-space-size=8192" yarn workspace @dbml/playground build
- name: Clean up old playground build
run: rm -rf dbml-homepage/static/playground
- name: Copy playground dist to homepage static
run: cp -r dbml-playground/dist dbml-homepage/static/playground
- name: Cache homepage node_modules
uses: actions/cache@v4
with:
path: |
dbml-homepage/node_modules
dbml-homepage/.yarn/cache
key: ${{ runner.os }}-yarn-homepage-${{ hashFiles('dbml-homepage/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-homepage-
- name: Install homepage dependencies
working-directory: dbml-homepage
run: yarn install --frozen-lockfile
- name: Build homepage
working-directory: dbml-homepage
run: yarn build