-
-
Notifications
You must be signed in to change notification settings - Fork 9
77 lines (66 loc) · 2.05 KB
/
Copy pathwebsite.yml
File metadata and controls
77 lines (66 loc) · 2.05 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
69
70
71
72
73
74
75
76
77
name: website
on:
push:
branches:
- master
paths:
- ".github/workflows/website.yml"
- "config/**"
- "packages/**"
- "website/**"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
pull_request:
paths:
- ".github/workflows/website.yml"
- "config/**"
- "packages/**"
- "website/**"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
workflow_dispatch:
concurrency:
group: website-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24.x
- uses: actions/setup-go@v5
with:
go-version-file: packages/ttsc/go.mod
cache-dependency-path: |
packages/ttsc/go.sum
packages/wasm/go.sum
- uses: pnpm/action-setup@v4
with:
version: 10.6.4
- name: Install Dependencies
run: pnpm install --frozen-lockfile
# The website's `build:compiler` step links against
# `packages/wasm/dist/wasm_exec.js` and consumes `@ttsc/wasm`'s host
# helper, so the wasm package must be built before `next build`.
# @ttsc/playground is the website worker's `@ttsc/playground` import;
# rspack resolves the package via its `main` field (`lib/src/index.js`),
# which only exists after `tsc -p .` runs.
- name: Build @ttsc/wasm
run: pnpm --filter @ttsc/wasm build
- name: Build @ttsc/playground
run: pnpm --filter @ttsc/playground build
- name: Build Website
working-directory: website
run: pnpm run build
- name: Deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: ./website/out