Some checks failed
Deploy to Azure Static Web Apps / build-and-deploy (push) Has been cancelled
35 lines
706 B
YAML
35 lines
706 B
YAML
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 }}"
|