8
8
9
9
env :
10
10
CI : true
11
+ MAIN_BRANCH : " main"
12
+ MAIN_REF : " refs/heads/main"
11
13
12
14
jobs :
13
15
install :
@@ -251,14 +253,14 @@ jobs:
251
253
uses : chromaui/action@v1
252
254
if : github.event.pull_request.draft == false
253
255
with :
254
- autoAcceptChanges : main
256
+ autoAcceptChanges : ${{ env.MAIN_BRANCH }}
255
257
projectToken : ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
256
258
storybookBuildDir : packages/storybook-css/dist/
257
259
258
260
publish-website :
259
261
runs-on : ubuntu-latest
260
262
needs : build
261
- if : github.ref == 'refs/heads/main'
263
+ if : github.ref == ${{ env.MAIN_REF }}
262
264
263
265
steps :
264
266
- name : Checkout release branch
@@ -279,15 +281,15 @@ jobs:
279
281
- name : Continuous Deployment to designsystem.utrecht.nl
280
282
uses : JamesIves/github-pages-deploy-action@v4.4.3
281
283
with :
282
- branch : main
284
+ branch : $${ env.MAIN_BRANCH }}
283
285
folder : packages/design-system-website/dist/
284
286
repository-name : nl-design-system/designsystem.utrecht.nl
285
287
token : ${{ secrets.DOCS_GH_TOKEN }}
286
288
287
289
publish-npm :
288
290
runs-on : ubuntu-latest
289
291
needs : [lint, test]
290
- if : github.ref == 'refs/heads/main'
292
+ if : github.ref == ${{ env.MAIN_REF }}
291
293
env :
292
294
NODE_OPTIONS : " --max-old-space-size=6114"
293
295
@@ -356,7 +358,7 @@ jobs:
356
358
GIT_COMMITTER_EMAIL : ${{ secrets.GIT_COMMITTER_EMAIL }}
357
359
GIT_COMMITTER_NAME : " NL Design System"
358
360
run : |
359
- git push --set-upstream origin HEAD
361
+ git push --set-upstream " origin/${MAIN_BRANCH}" HEAD
360
362
pnpm run release
361
363
362
364
- name : " Continuous Deployment: publish to npm"
0 commit comments