Skip to content

update action versions and include package-lock.json #2

update action versions and include package-lock.json

update action versions and include package-lock.json #2

name: Deploy Frontend
on:
push:
branches: [main]
paths:
- 'frontend/**'
- '.github/workflows/deploy-frontend.yml'
- 'infra/**'
workflow_dispatch:
# Note: This workflow uses Static Web App deployment token
# No service principal needed!
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: Build
working-directory: frontend
run: npm run build
env:
NODE_ENV: production
- 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: 'frontend/dist/frontend/browser'
skip_app_build: true