-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.14 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# build angular app using node.js, then deploy to azure static website
on:
push:
branches:
- main
workflow_dispatch:
env:
NODE_VERSION: '18.x'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: src/package-lock.json
- name: npm install, build, and test
working-directory: src
run: |
npm install -g @angular/cli
npm install
ng build
- name: Upload artifact for deployment job
uses: actions/[email protected]
with:
name: angular-app
path: src/dist
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: angular-app
- name: 'Deploy to Azure Static Website'
id: deploy-to-static-web
uses: TravisSpomer/[email protected]
with:
source-path: web3toolkit
sas-url: ${{ secrets.DEPLOY_SAS_URL }}