This repository was archived by the owner on Jul 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
52 lines (44 loc) · 1.52 KB
/
cd-www-stage.yml
File metadata and controls
52 lines (44 loc) · 1.52 KB
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
name: CD - FAST
on:
push:
branches:
- master
jobs:
build_deploy_linux:
runs-on: ubuntu-latest
env:
AZURE_WEBAPP_ACTIVE_STAGE_NAME: www-west-app
AZURE_WEBAPP_PASSIVE_STAGE_NAME: www-east-app
AZURE_WEBAPP_BUILD_PATH: sites/website
AZURE_WEBAPP_DIST_PATH: sites/website/build
AZURE_WEBAPP_SLOT_NAME: stage
steps:
- name: Checkout Branch
uses: actions/checkout@master
- name: Install Lerna
run: yarn global add lerna
- name: Install package dependencies / prepare workspaces
run: yarn install --frozen-lockfile
- name: Build & Prepare Web Application
run: |
cd ${{ env.AZURE_WEBAPP_BUILD_PATH }}
npm i
yarn build
cp ../site-utilities/statics/server/package.json ../site-utilities/statics/server/server.js build
cd build
npm i
ls -lta
- name: 'Deploy to Active Azure Region'
uses: azure/webapps-deploy@v2
with:
publish-profile: ${{ secrets.AZURE_PUBLISH_PROFILE_WWW_ACTIVE }}
app-name: ${{ env.AZURE_WEBAPP_ACTIVE_STAGE_NAME }}
package: ${{ env.AZURE_WEBAPP_DIST_PATH }}
slot-name: ${{ env.AZURE_WEBAPP_SLOT_NAME }}
- name: 'Deploy to Passive Azure Region'
uses: azure/webapps-deploy@v2
with:
publish-profile: ${{ secrets.AZURE_PUBLISH_PROFILE_WWW_PASSIVE }}
app-name: ${{ env.AZURE_WEBAPP_PASSIVE_STAGE_NAME }}
package: ${{ env.AZURE_WEBAPP_DIST_PATH }}
slot-name: ${{ env.AZURE_WEBAPP_SLOT_NAME }}