From 4a0cd6a91cac9c8856fda67ece189fc7aa7361db Mon Sep 17 00:00:00 2001 From: Jonathan Bourdon Date: Wed, 15 Jan 2025 23:29:41 -0500 Subject: [PATCH] Adds azure secrets for SWA --- .github/workflows/frontend-ci.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml index 43541f1..eefef79 100644 --- a/.github/workflows/frontend-ci.yml +++ b/.github/workflows/frontend-ci.yml @@ -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 }} \ No newline at end of file + azure_static_web_apps_api_token: ${{ secrets.AZURE_SWA_TOKEN }}