From b7b3545ae3b47927299cdcbd92bc26d7369ffbdd Mon Sep 17 00:00:00 2001 From: Aarti Panchal Date: Wed, 25 Jun 2025 13:42:11 +0530 Subject: [PATCH 1/3] Add GitHub Actions workflow for Azure Static Web App --- .github/workflows/deploy.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..b95ec38 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,36 @@ +name: Azure Static Web Apps CI/CD + +on: + push: + branches: + - main # or your default branch + workflow_dispatch: + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + name: Build and Deploy Job + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install dependencies + run: npm install + + - name: Build project + run: npm run build + + - name: Deploy to Azure Static Web App + 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: "." # Location of your React app ('.' if it's in root) + output_location: "build" # 'build' for CRA, 'dist' for Vite From addf4855862884df7f48d50bd07bbe3542487636 Mon Sep 17 00:00:00 2001 From: Aarti Panchal Date: Wed, 25 Jun 2025 14:07:55 +0530 Subject: [PATCH 2/3] Trigger redeploy From 94024133f811fa0ec53ae2c1139f80dad6f72f74 Mon Sep 17 00:00:00 2001 From: Aarti Panchal Date: Wed, 25 Jun 2025 14:58:00 +0530 Subject: [PATCH 3/3] Force redeploy with correct output