-
Notifications
You must be signed in to change notification settings - Fork 7
47 lines (40 loc) · 1.13 KB
/
build-dev-push-azure.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
name: CICD Frontend Dev
run-name: ${{ github.actor }} Committed code for azure blob storage
on:
push:
branches:
- dev
env:
ACCOUNT_NAME: udirdit
SOURCE: dist
DESTINATION: udirdesign-dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: yarn install
- name: Run build script
run: npm run buildDev
- name: Login to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Upload files to Azure Blob
uses: azure/CLI@v1
with:
azcliversion: 2.48.1
inlineScript: |
az storage blob upload-batch --account-name ${{ env.ACCOUNT_NAME }} \
--auth-mode key -s ${{ env.SOURCE }} -d ${{ env.DESTINATION }} --overwrite
# Azure logout - Force step to always run with 'always()', ensures no hanging logins
- name: logout
if: always()
run: |
az logout