-
Notifications
You must be signed in to change notification settings - Fork 29
49 lines (44 loc) · 1.62 KB
/
build-and-deploy-dev.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
49
# This workflow will build a docker image, push it to ghcr.io, and deploy it to an Azure WebApp.
name: Build and Deploy -- DEV
on:
workflow_dispatch:
push:
branches: [master]
jobs:
upload-package-lock-json:
name: Upload package-lock.json from this repo
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Upload package-lock.json
uses: actions/upload-artifact@v4
with:
name: package-lock.json
path: package-lock.json
make-react-secret-available:
name: Make REACT_APP_GA_TRACKINGID_DEV secret available in env
runs-on: ubuntu-latest
outputs:
trackingid: "${{ env.REACT_APP_GA_TRACKINGID }}"
steps:
- name: Make secret available
run: |
echo "REACT_APP_GA_TRACKINGID=$REACT_APP_GA_TRACKINGID_DEV" >> $GITHUB_ENV
build-and-deploy:
name: Build and Deploy
needs: [upload-package-lock-json, make-react-secret-available]
uses: clearlydefined/operations/.github/workflows/app-build-and-deploy.yml@v3.1.2
secrets:
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
AZURE_WEBAPP_PUBLISH_PROFILE: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE_DEV }}
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
PRODUCTION_DEPLOYERS: ${{ secrets.PRODUCTION_DEPLOYERS }}
with:
deploy-env: dev
application-type: ui
azure-app-base-name: clearlydefined
azure-app-name-postfix: -dev
docker-build-args: |
REACT_APP_SERVER=https://dev-api.clearlydefined.io
REACT_APP_GA_TRACKINGID=${{ needs.make-react-secret-available.outputs.trackingid }}