Add deployment workflow for Azure Static Web Apps
Some checks failed
Deploy to Azure Static Web Apps / build-and-deploy (push) Has been cancelled

This commit is contained in:
2025-11-28 10:16:41 -06:00
parent 2db3a0570a
commit 458c4b7973

View File

@@ -0,0 +1,34 @@
name: Deploy to Azure Static Web Apps
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Install Azure SWA CLI
run: npm install -g @azure/static-web-apps-cli
- name: Deploy to Azure Static Web Apps
run: |
swa deploy ./dist \
--env production \
--deployment-token "${{ secrets.AZURE_SWA_DEPLOYMENT_TOKEN }}"