-
Notifications
You must be signed in to change notification settings - Fork 8k
46 lines (43 loc) · 1.09 KB
/
azureCliDeploy.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
name: Deploy to demo (azure storage)
on:
push:
branches:
- demo
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16.13.0
- uses: actions/checkout@v3
with:
ref: demo
- name: npm install, build
run: |
npm install
npm run build:demo:prod
# Azure CLI
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_RBAC_CREDENTIALS }}
# Clear storage
- name: Clear blob storage
uses: azure/CLI@v1
with:
inlineScript: |
az storage blob delete-batch -s '$web' --account-name ngxadmin --debug
# Upload to storage
- name: Upload to blob storage
uses: azure/CLI@v1
with:
inlineScript: |
az storage blob upload-batch -d '$web' -s dist --account-name ngxadmin --debug
# Azure logout
- name: logout
run: |
az logout
if: always()