Skip to content

Commit 5b5d269

Browse files
authored
Better ci (#127)
* Use `npm ci` and build app on PRs * deploy on main * Use same CI env var setting for PR pipeline and deployment --------- Co-authored-by: Benjamin Karran <[email protected]>
1 parent 7a84dfe commit 5b5d269

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.github/workflows/github-pages.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: github pages release
22

3-
on: workflow_dispatch
4-
# push:
5-
# branches:
6-
# - main
3+
on:
4+
push:
5+
branches:
6+
- main
77
# paths:
88
# - '.storybook'
99
# - 'public'
@@ -28,7 +28,7 @@ jobs:
2828
CI: false
2929
run: |
3030
ls
31-
npm install
31+
npm ci
3232
npm run build
3333
3434
- name: Build storybook

.github/workflows/sample-app-web.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ jobs:
3737

3838
# Site Testing steps
3939
- name: Install dependencies
40-
run: npm install
40+
run: npm ci
41+
42+
- name: Build
43+
run: CI=false npm run build
4144

4245
- name: Run Unit Tests and generate coverage report
4346
run: npm run test.coverage

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ ENV PATH="$HOME/sc-4.8.2-linux/bin:$PATH"
88
# web app
99
WORKDIR /sample-app-web
1010
COPY . .
11-
RUN npm install
11+
RUN npm ci

0 commit comments

Comments
 (0)