-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (43 loc) · 1.18 KB
/
deploy-production.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
48
name: Deploy production from main
on:
push:
branches: [main]
workflow_dispatch:
env:
NODE_VERSION: "16.x"
concurrency: production-environment
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14.x
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --silent
- run: yarn test
build-and-deploy:
name: Build and deploy
runs-on: ubuntu-latest
needs: test
environment: production
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: yarn build
env:
# The license needs to present when building, so that the admin-ui is built as enterprise version
STRAPI_LICENSE: ${{ secrets.STRAPI_LICENSE }}
run: |
yarn install --silent
yarn build
- name: Deploy to Azure webApp
uses: azure/webapps-deploy@v2
with:
app-name: pof-backend-production
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}