diff --git a/.github/workflows/azure-static-web-apps-green-cliff-0220ecb10.yml b/.github/workflows/azure-static-web-apps-green-cliff-0220ecb10.yml index aa3ebb7..921b874 100644 --- a/.github/workflows/azure-static-web-apps-green-cliff-0220ecb10.yml +++ b/.github/workflows/azure-static-web-apps-green-cliff-0220ecb10.yml @@ -3,7 +3,7 @@ name: Azure Static Web Apps CI/CD on: push: branches: - - main + - development pull_request: types: [opened, synchronize, reopened, closed] branches: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..db8e0a8 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,31 @@ +name: Deploy React App to Azure using Publish Profile + +on: + push: + branches: + - main +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