-
Notifications
You must be signed in to change notification settings - Fork 499
58 lines (56 loc) · 1.79 KB
/
website-deploy-prod.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
50
51
52
53
54
55
56
57
58
name: Build & Deploy to Production
on: [push]
jobs:
build:
if: github.repository == 'microsoft/Microsoft365DSC' && github.event.ref == 'refs/heads/master'
runs-on: ubuntu-latest
environment:
name: PROD
name: Build
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: "16"
- name: Generate workloads and resources
shell: pwsh
run: pwsh -command ".\$GITHUB_WORKSPACE\generator\scripts\Build-Workloads.ps1 -Force"
- name: Install packages
run: |
cd ${GITHUB_WORKSPACE}/generator
npm install --force
- name: Build generator
run: |
cd ${GITHUB_WORKSPACE}/generator
npm run build
env:
REACT_APP_SITE_DESCRIPTION: ${{ secrets.REACT_APP_SITE_DESCRIPTION }}
REACT_APP_INSTRUMENTATION_KEY: ${{ secrets.REACT_APP_INSTRUMENTATION_KEY }}
- name: Publish Artifact
uses: actions/upload-artifact@master
with:
name: website-build
path: ${{ github.workspace }}/generator/build
deploy_prod:
if: github.repository == 'microsoft/Microsoft365DSC' && github.event.ref == 'refs/heads/master'
runs-on: ubuntu-latest
environment:
name: PROD
name: Deploy to Production
needs: build
steps:
- uses: actions/download-artifact@master
with:
name: website-build
- name: Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: ""
output_location: ""
skip_app_build: true