Add deployment workflow for Azure Static Web Apps
Some checks failed
Deploy to Azure Static Web Apps / build-and-deploy (push) Has been cancelled
Some checks failed
Deploy to Azure Static Web Apps / build-and-deploy (push) Has been cancelled
This commit is contained in:
34
.gitea/workflows/deploy.yml
Normal file
34
.gitea/workflows/deploy.yml
Normal 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 }}"
|
||||
Reference in New Issue
Block a user