First Release v1.0.0
Deploy to Azure Static Web Apps / build_and_deploy (push) Waiting to run
Deploy to Azure Static Web Apps / close_pull_request (push) Waiting to run

This commit is contained in:
Daniel Krähenbühl
2026-06-16 21:52:55 +02:00
commit 4f304b8ed4
297 changed files with 32673 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
name: Deploy to Azure Static Web Apps
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, closed]
branches: [main]
jobs:
build_and_deploy:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
run: corepack enable pnpm
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
env:
SITE_URL: ${{ secrets.SITE_URL }}
- name: Deploy to Azure Static Web Apps
run: npx --yes @azure/static-web-apps-cli@latest deploy dist --deployment-token "${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}" --env production
close_pull_request:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
steps:
- name: Close preview environment
run: npx --yes @azure/static-web-apps-cli@latest deploy --deployment-token "${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}" --env close