diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..4e9d2d9 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,32 @@ +name: Deploy React App to Azure using Publish Profile + +on: + push: + branches: + - main # or your chosen deployment branch + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 22.13.1 + + - name: Install dependencies + run: npm install + + - name: Build React app + run: npm run build + + - name: Deploy to Azure Web App + uses: azure/webapps-deploy@v2 + with: + app-name: redirection-app + publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} + package: build