feat: add Azure Static Web App deployment for frontend

Create deploy-frontend.yml workflow using Azure/static-web-apps-deploy@v1.
Add output: 'export' to next.config.mjs for static site generation.
Static Web App created in Operation resource group (soc-frontend, Free tier).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
gongzhiyong
2026-04-08 15:53:54 +08:00
co-authored by Claude Opus 4.6
parent a36f039ff9
commit 3869be3ccc
2 changed files with 27 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
name: Deploy Frontend to Azure Static Web App
on:
push:
branches: [main]
paths:
- "frontend/**"
- ".github/workflows/deploy-frontend.yml"
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Deploy to Azure Static Web Apps
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: frontend
output_location: out
+1 -1
View File
@@ -1,12 +1,12 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
typescript: {
ignoreBuildErrors: true,
},
images: {
unoptimized: true,
},
}
export default nextConfig