Adds azure secrets for SWA

This commit is contained in:
2025-01-15 23:29:41 -05:00
parent a3de839755
commit 4a0cd6a91c

View File

@@ -2,25 +2,36 @@ name: Frontend CI/CD
on:
push:
branches: [ "main" ]
branches:
- main
env:
AZURE_SWA_NAME: hutopy-portal
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- uses: actions/checkout@v2
- name: Install dependencies
# Npm install
- name: npm install
run: |
cd frontend
npm install
- name: Build
# Npm run build
- name: npm run build
run: |
cd frontend
npm run build
- name: Deploy to Azure Static Web Apps
uses: azure/static-web-apps-deploy@v1
with:
app_location: "frontend"
app_location: '${{ env.AZURE_SWA_NAME }}'
api_location: ""
output_location: "dist"
azure_static_web_apps_api_token: ${{ secrets.AZURE_SWA_TOKEN }}