chore(swa): add Azure Static Web Apps CI/CD workflow for Next.js (.next output, Node 20.11.1)

This commit is contained in:
xiaohei
2025-12-29 07:10:25 +00:00
parent 1aae986f7e
commit 5c8cfd6c54
@@ -0,0 +1,36 @@
name: Azure Static Web Apps CI/CD
on:
push:
branches:
- gzy
workflow_dispatch:
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.11.1'
- name: Install dependencies
run: npm ci
- name: Build app
run: npm run build
- 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: '/'
output_location: '.next'
skip_api_build: true
app_build_command: 'npm run build'