-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (70 loc) · 1.87 KB
/
ci.yml
File metadata and controls
90 lines (70 loc) · 1.87 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
name: jobmanri-fe CI
on:
pull_request:
branches: [main, develop]
push:
branches: [main, develop]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
jobs:
quality-check:
name: Check Lint & Type
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Node.js & Dependencies
uses: ./.github/actions/setup
- name: Run ESLint
run: yarn lint
- name: Run TypeScript type check
run: yarn type-check
deploy-storybook:
name: Deploy Storybook
runs-on: ubuntu-latest
needs: quality-check
env:
YARN_NODE_LINKER: node-modules
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "20"
cache: "yarn"
- name: Enable Corepack
shell: bash
run: corepack enable
- name: Install dependencies (Force node-modules)
shell: bash
run: yarn install --immutable
- name: Build Storybook
run: yarn build-storybook
- name: Publish to Chromatic
run: yarn chromatic
env:
CHROMATIC_PROJECT_TOKEN: ${{env.CHROMATIC_PROJECT_TOKEN}}
build:
name: Build
runs-on: ubuntu-latest
needs: quality-check
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Node.js & Dependencies
uses: ./.github/actions/setup
- name: Build Next.js application
run: yarn build
- name: Upload build artifacts
uses: actions/upload-artifact@v5
with:
name: build-output
path: .next/
retention-days: 7