Skip to content

Commit 13dea7d

Browse files
committed
workflow to publish github pages
1 parent fefd9a2 commit 13dea7d

File tree

3 files changed

+40
-1
lines changed

3 files changed

+40
-1
lines changed

.github/workflows/deploy.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: deploy
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches:
7+
- master
8+
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
node-version: [18.16]
16+
17+
steps:
18+
- name: Checkout Repository
19+
uses: actions/checkout@v3
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
# npm ci REQUIRES a package-lock.json
25+
- name: Install Dependencies
26+
run: npm ci
27+
- name: Build js and modules
28+
run: npm run build:app
29+
- name: Deploy page
30+
uses: peaceiris/actions-gh-pages@v3
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
publish_dir: ./dist/zingchart-angular-app
34+
user_name: 'github-actions[bot]'
35+
user_email: 'github-actions[bot]@users.noreply.github.com'
36+
destination_dir: ./
37+
keep_files: false
38+

angular.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"build": {
1414
"builder": "@angular-devkit/build-angular:browser",
1515
"options": {
16-
"outputPath": "dist/zingchart-angular",
16+
"outputPath": "dist/zingchart-angular-app",
1717
"index": "src/index.html",
1818
"main": "src/main.ts",
1919
"polyfills": [

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"ng": "ng",
66
"start": "ng serve",
77
"build": "ng cache clean && ng build zingchart-angular-component",
8+
"build:app": "ng cache clean && ng build",
89
"watch": "ng build --watch --configuration development",
910
"test": "ng test zingchart-angular-component",
1011
"publish": "cd dist/zingchart-angular && npm publish --access public",

0 commit comments

Comments
 (0)