Skip to content

Commit d0e4f52

Browse files
committed
change azure deployment strategy
1 parent 8a67a8f commit d0e4f52

File tree

2 files changed

+37
-73
lines changed

2 files changed

+37
-73
lines changed

.github/workflows/azure-static-web-apps-mango-pebble-04d97680f.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy to Azure App Service
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
env:
9+
AZURE_WEBAPP_NAME: static-docs-site
10+
AZURE_WEBAPP_PACKAGE_PATH: '.'
11+
NODE_VERSION: '20.x'
12+
13+
jobs:
14+
build-and-deploy:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ env.NODE_VERSION }}
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Build application
30+
run: npm run build
31+
32+
- name: Deploy to Azure Web App
33+
uses: azure/webapps-deploy@v2
34+
with:
35+
app-name: ${{ env.AZURE_WEBAPP_NAME }}
36+
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
37+
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}

0 commit comments

Comments
 (0)