Skip to content

Commit a835420

Browse files
committed
feat(ci/cd): add github workflow, fix npm script
1 parent 041ac5c commit a835420

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Angular CI/CD
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
- name: Use Node.js
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: '16'
19+
- name: Install dependencies
20+
run: npm install
21+
- name: Build the Angular app
22+
run: npm run build-prod
23+
- name: Compress dist folder
24+
run: tar -czf dist.tar.gz dist/
25+
- name: Upload artifact
26+
uses: actions/upload-artifact@v2
27+
with:
28+
name: dist
29+
path: dist.tar.gz

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"start": "ng serve --host 0.0.0.0 --port 443",
77
"http": "http-server -p 8080 -c-1 dist/aqua-viewer",
88
"build": "ng build",
9-
"build prod": "ng build --configuration=production",
9+
"build-prod": "ng build --configuration=production",
1010
"test": "ng test",
1111
"lint": "ng lint",
1212
"e2e": "ng e2e",

0 commit comments

Comments
 (0)