mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 15:40:11 +01:00
Merge pull request #5865 from akveo/azureCliDeploy-demo
add azure cli deploy demo
This commit is contained in:
commit
81e1d83e3e
2 changed files with 40 additions and 29 deletions
40
.github/workflows/azureCliDeploy.yml
vendored
Normal file
40
.github/workflows/azureCliDeploy.yml
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
name: Deploy to demo (azure storage)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- demo
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Use Node.js 10.x
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '10.x'
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: demo
|
||||||
|
- name: npm install, build
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run build:demo:prod
|
||||||
|
|
||||||
|
# Azure CLI Upload to storage
|
||||||
|
- uses: azure/login@v1
|
||||||
|
with:
|
||||||
|
creds: ${{ secrets.AZURE_RBAC_CREDENTIALS }}
|
||||||
|
- name: Upload to blob storage
|
||||||
|
uses: azure/CLI@v1
|
||||||
|
with:
|
||||||
|
azcliversion: 2.0.72
|
||||||
|
inlineScript: |
|
||||||
|
az storage blob upload-batch -d '$web' -s dist --account-name ngxadmin --debug
|
||||||
|
|
||||||
|
# Azure logout
|
||||||
|
- name: logout
|
||||||
|
run: |
|
||||||
|
az logout
|
||||||
|
if: always()
|
||||||
29
.github/workflows/demoDeploy.yml
vendored
29
.github/workflows/demoDeploy.yml
vendored
|
|
@ -1,29 +0,0 @@
|
||||||
|
|
||||||
name: Deploy to demo
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'demo'
|
|
||||||
paths:
|
|
||||||
- 'src/**'
|
|
||||||
repository_dispatch:
|
|
||||||
types: deploy-to-demo
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: shimataro/ssh-key-action@v2
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY }}
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
- name: Use Node.js 12.x
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
ref: demo
|
|
||||||
- run: npm install
|
|
||||||
- run: npm run build:demo:prod
|
|
||||||
- run: rsync -r --delete-after dist/. "${{ secrets.REMOTE_URL }}":"${{ secrets.ADDRESS }}"
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue