-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.33 KB
/
cd.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
name: Azure Static Web Apps CI/CD
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install node packages
run: npm install
- name: Build production static files
run: npm run build
- name: Copy the staticwebapp.config.json file to the dist folder
run: cp ./staticwebapp.config.json ./dist
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: ./dist
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: dist
path: ./dist
- name: Deploy to Azure Static Web Apps
uses: azure/static-web-apps-deploy@latest
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_DEPLOYMENT_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
###### Repository/Build Configurations ######
app_location: "./dist"
api_location: ""
output_location: ""
skip_app_build: true
###### End of Repository/Build Configurations ######