1
- name : " Deploy (Production)"
1
+ name : ' Deploy (Production)'
2
2
on :
3
3
workflow_dispatch :
4
4
inputs :
22
22
steps :
23
23
- name : Checkout PR
24
24
uses : actions/checkout@v3
25
- # with:
26
- # submodules: 'true'
25
+ # with:
26
+ # submodules: 'true'
27
27
- name : Use Node.js ${{ matrix.node-version }}
28
28
uses : actions/setup-node@v3
29
29
with :
@@ -33,20 +33,20 @@ jobs:
33
33
34
34
lint :
35
35
name : Lint
36
- needs : [ " install" ]
36
+ needs : [' install' ]
37
37
runs-on : ubuntu-latest
38
38
steps :
39
39
- name : Checkout PR
40
40
uses : actions/checkout@v3
41
- # with:
42
- # submodules: 'true'
41
+ # with:
42
+ # submodules: 'true'
43
43
- name : Use Node.js ${{ matrix.node-version }}
44
44
uses : actions/setup-node@v3
45
45
with :
46
46
node-version : ${{ matrix.node-version }}
47
47
- name : 📥 Monorepo install
48
48
uses : ./.github/actions/pnpm-install
49
- - name : " [API] Generate Prisma Migration"
49
+ - name : ' [API] Generate Prisma Migration'
50
50
run : |
51
51
pnpm --filter=@codeimage/api exec prisma generate
52
52
pnpm --filter=@codeimage/prisma-models build
@@ -55,25 +55,25 @@ jobs:
55
55
56
56
build-packages :
57
57
name : Build packages/**
58
- needs : [ " install" ]
58
+ needs : [' install' ]
59
59
runs-on : ubuntu-latest
60
60
steps :
61
61
- uses : actions/checkout@v3
62
- # with:
63
- # submodules: 'true'
62
+ # with:
63
+ # submodules: 'true'
64
64
- name : Use Node.js ${{ matrix.node-version }}
65
65
uses : actions/setup-node@v3
66
66
with :
67
67
node-version : ${{ matrix.node-version }}
68
68
- name : 📥 Monorepo install
69
69
uses : ./.github/actions/pnpm-install
70
70
71
- - name : " [API] Generate Prisma Migration"
71
+ - name : ' [API] Generate Prisma Migration'
72
72
run : |
73
73
pnpm --filter=@codeimage/api exec prisma generate
74
74
pnpm --filter=@codeimage/prisma-models build
75
75
76
- - name : " Build packages"
76
+ - name : ' Build packages'
77
77
run : |
78
78
pnpm libs:build
79
79
@@ -84,21 +84,21 @@ jobs:
84
84
key : packages-dist-${{ github.run_id }}-${{ github.run_number }}
85
85
86
86
build-api :
87
- name : " Build @codeimage/api"
88
- needs : [ " install" ]
87
+ name : ' Build @codeimage/api'
88
+ needs : [' install' ]
89
89
runs-on : ubuntu-latest
90
90
steps :
91
91
- uses : actions/checkout@v3
92
- # with:
93
- # submodules: 'true'
92
+ # with:
93
+ # submodules: 'true'
94
94
- name : Use Node.js ${{ matrix.node-version }}
95
95
uses : actions/setup-node@v3
96
96
with :
97
97
node-version : ${{ matrix.node-version }}
98
98
- name : 📥 Monorepo install
99
99
uses : ./.github/actions/pnpm-install
100
100
101
- - name : " [API] Generate Prisma Migration"
101
+ - name : ' [API] Generate Prisma Migration'
102
102
run : |
103
103
pnpm --filter=@codeimage/api exec prisma generate
104
104
pnpm --filter=@codeimage/prisma-models build
@@ -118,7 +118,7 @@ jobs:
118
118
119
119
test-api :
120
120
name : Api test
121
- needs : [ install ]
121
+ needs : [install]
122
122
runs-on : ubuntu-latest
123
123
124
124
services :
@@ -146,7 +146,7 @@ jobs:
146
146
GRANT_TYPE_AUTH0 : client_credentials
147
147
MOCK_AUTH : false
148
148
MOCK_AUTH_EMAIL : dev@example.it
149
- ALLOWED_ORIGINS : " * "
149
+ ALLOWED_ORIGINS : ' * '
150
150
151
151
steps :
152
152
- uses : actions/checkout@v3
@@ -159,7 +159,7 @@ jobs:
159
159
- name : 📥 Monorepo install
160
160
uses : ./.github/actions/pnpm-install
161
161
162
- - name : " Run prisma DB migrations"
162
+ - name : ' Run prisma DB migrations'
163
163
run : |
164
164
cd apps/api
165
165
pnpm exec prisma migrate deploy
@@ -174,12 +174,12 @@ jobs:
174
174
175
175
typecheck-packages :
176
176
name : Type-checking packages/**
177
- needs : [ " install", " build-packages" ]
177
+ needs : [' install', ' build-packages' ]
178
178
runs-on : ubuntu-latest
179
179
steps :
180
180
- uses : actions/checkout@v3
181
- # with:
182
- # submodules: 'true'
181
+ # with:
182
+ # submodules: 'true'
183
183
- name : Use Node.js ${{ matrix.node-version }}
184
184
uses : actions/setup-node@v3
185
185
with :
@@ -205,12 +205,12 @@ jobs:
205
205
deploy-highlight-package :
206
206
name : Deploy @codeimage/highlight app
207
207
environment : Production
208
- needs : [ " install", " lint", " build-packages" ]
208
+ needs : [' install', ' lint', ' build-packages' ]
209
209
runs-on : ubuntu-latest
210
210
steps :
211
211
- uses : actions/checkout@v3
212
- # with:
213
- # submodules: 'true'
212
+ # with:
213
+ # submodules: 'true'
214
214
- name : Use Node.js ${{ matrix.node-version }}
215
215
uses : actions/setup-node@v3
216
216
with :
@@ -239,12 +239,12 @@ jobs:
239
239
deploy-api :
240
240
name : Build and Deploy Api
241
241
environment : Production
242
- needs : [ install, lint, typecheck-packages, test-api, build-api ]
242
+ needs : [install, lint, typecheck-packages, test-api, build-api]
243
243
runs-on : ubuntu-latest
244
244
steps :
245
245
- uses : actions/checkout@v3
246
- # with:
247
- # submodules: 'true'
246
+ # with:
247
+ # submodules: 'true'
248
248
- name : Use Node.js ${{ matrix.node-version }}
249
249
uses : actions/setup-node@v3
250
250
with :
@@ -274,21 +274,21 @@ jobs:
274
274
find -type f -name '.gitignore' -delete
275
275
pnpm railway link --environment production $RAILWAY_API_PROJECT_ID
276
276
cd dist/api-bundle
277
- pnpm railway up --detach
277
+ pnpm railway up -s codeimage
278
278
env :
279
279
RAILWAY_TOKEN : ${{ secrets.RAILWAY_TOKEN }}
280
280
RAILWAY_API_PROJECT_ID : ${{ secrets.RAILWAY_API_PROJECT_ID }}
281
281
282
282
deploy-app :
283
283
name : Deploy @codeimage/app
284
284
environment : Production
285
- needs : [ install, lint, typecheck-packages, build-packages, deploy-api ]
285
+ needs : [install, lint, typecheck-packages, build-packages, deploy-api]
286
286
runs-on : ubuntu-latest
287
287
steps :
288
288
- name : Checkout PR
289
289
uses : actions/checkout@v3
290
- # with:
291
- # submodules: 'true'
290
+ # with:
291
+ # submodules: 'true'
292
292
- name : Use Node.js ${{ matrix.node-version }}
293
293
uses : actions/setup-node@v3
294
294
with :
@@ -325,23 +325,22 @@ jobs:
325
325
github-token : ${{ secrets.GITHUB_TOKEN }} # Optional
326
326
vercel-args : ' --prebuilt --prod' # Optional
327
327
working-directory : apps/codeimage
328
- vercel-org-id : ${{ secrets.VERCEL_ORG_ID}} # Required
328
+ vercel-org-id : ${{ secrets.VERCEL_ORG_ID}} # Required
329
329
vercel-project-id : ${{ secrets.VERCEL_PROJECT_ID }} # Required
330
330
alias-domains : | # Optional
331
331
app.codeimage.dev
332
332
333
-
334
333
deploy-website :
335
334
if : ${{ github.event.inputs.deploy-website == 'true' }}
336
335
name : Deploy @codeimage/website
337
336
environment : Production
338
- needs : [ install, lint, typecheck-packages, build-packages ]
337
+ needs : [install, lint, typecheck-packages, build-packages]
339
338
runs-on : ubuntu-latest
340
339
steps :
341
340
- name : Checkout PR
342
341
uses : actions/checkout@v3
343
- # with:
344
- # submodules: 'true'
342
+ # with:
343
+ # submodules: 'true'
345
344
- name : Use Node.js ${{ matrix.node-version }}
346
345
uses : actions/setup-node@v3
347
346
with :
0 commit comments