mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-02-18 14:08:07 +01:00
* feat(deploy): enable manual triggering * fix(deploy): use the default azure/CLI version * doc(deploy): update action trigger guid * feat(deploy): enable manual triggering for docs * feat(deploy): clear storage before uploading * feat(deploy): use test branch for deploy * fix(deploy): code clean up * fix(deploy): command issues * fix(deploy): command issues * feat(deploy): switch deploy branch to demo Co-authored-by: artem.zaiko.ext <artem.zaiko.ext@munichgeneral.com>
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
name: Deploy to demo (azure storage)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- demo
|
|
workflow_dispatch:
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Use Node.js 12
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '12'
|
|
- uses: actions/checkout@v2
|
|
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()
|