-
Notifications
You must be signed in to change notification settings - Fork 10
85 lines (79 loc) · 2.07 KB
/
frontend-check.yml
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
name: "[frontend] Lint, Typecheck"
on:
push:
paths:
- "frontend/**"
- ".github/workflows/frontend-*.yml"
- "Rakefile"
- "config.test.yml"
pull_request:
paths:
- "frontend/**"
- ".github/workflows/frontend-*.yml"
- "Rakefile"
- "config.test.yml"
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
- name: Setup .env
run: |
cp ./config.test.yml ./config.yml
rake configure
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9.2.0
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: frontend/.node-version
cache: "pnpm"
cache-dependency-path: frontend/pnpm-lock.yaml
- name: Run frontend lint
working-directory: ./frontend
run: |
pnpm i
pnpm check
- name: Run frontend typecheck
working-directory: ./frontend
run: |
pnpm typecheck
build:
runs-on: ubuntu-latest
needs:
- check
permissions:
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9.2.0
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: frontend/.node-version
cache: "pnpm"
cache-dependency-path: frontend/pnpm-lock.yaml
- name: Build production
working-directory: ./frontend
run: |
pnpm i
pnpm build
env:
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT_FRONTEND: ${{ secrets.SENTRY_PROJECT_FRONTEND }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Build image
if: github.ref_name == 'main'
uses: ./.github/actions/build
with:
directory-name: frontend