-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (71 loc) · 2.17 KB
/
deploy.yml
File metadata and controls
91 lines (71 loc) · 2.17 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Deploy to GitHub Pages
on:
push:
tags: ['v*']
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'pages'
cancel-in-progress: true
# Third-party actions pinned to SHAs; see ci.yml header for the procedure
# to update a pin.
jobs:
# Gate the deploy on the same lint/typecheck/test suite that gates main.
# CI passing on `main` doesn't transfer to a tag push — without this job
# a tag can deploy commits that would fail CI.
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci
- name: Format check
run: npm run format:check
- name: Lint
run: npm run lint
- name: Type check
run: npm run typecheck
- name: Tests
run: npm run test
deploy:
needs: [check]
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable (2026-04-15)
with:
targets: wasm32-unknown-unknown
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
workspaces: 'crates/solver -> target'
- name: Install wasm-pack
uses: taiki-e/install-action@e49978b799e49ff429d162b7a30601a569ab6538 # v2.81.1
with:
tool: wasm-pack@0.13.1
- run: npm ci
- run: npm run build:pages
env:
VITE_SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
VITE_SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
VITE_APP_VERSION: ${{ github.ref_name }}
- uses: actions/configure-pages@v6
- uses: actions/upload-pages-artifact@v5
with:
path: './dist/CaLab'
- id: deployment
uses: actions/deploy-pages@v5