Discourage XML on Booking & Pickup APIs #3253
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Azure Static Web Apps CI/CD | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, synchronize, reopened, closed] | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build-and-deploy: | |
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master') | |
runs-on: ubuntu-latest | |
name: Build and Deploy | |
env: | |
ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }} | |
ALGOLIA_INDEX: ${{ github.ref == 'refs/heads/master' && 'devsite_prod' || 'devsite_qa' }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build and Deploy | |
id: deploystaging | |
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: "." | |
output_location: "_site" | |
app_build_command: 'npm run buildprod' | |
- name: update algolia search index for prod | |
if: github.ref == 'refs/heads/master' | |
run: npm run algolia | |
- name: update algolia search index for qa | |
if: github.ref != 'refs/heads/master' | |
run: npm run qalgolia | |
- name: notify slack failure | |
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && failure() | |
env: | |
SLACK_MESSAGE: '{"channel": "#deploy", "text", ":build_failed: <!subteam^S041J3HU7PU> Failed to deploy developer-site <${{ steps.get_self_url.outputs.link }}|Check details>"}' | |
run: | | |
curl -sX POST -H "Content-type: application/json" -d "$SLACK_MESSAGE" ${{ secrets.SLACK_WEBHOOK }} | |
- name: notify slack success | |
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && success() | |
env: | |
SLACK_MESSAGE: '{"channel": "#deploy", "text": ":build_succeed: Deployed developer site"}' | |
run: | | |
curl -sX POST -H "Content-type: application/json" -d "$SLACK_MESSAGE" ${{ secrets.SLACK_WEBHOOK }} | |
close-pull-request: | |
if: github.event_name == 'pull_request' && github.event.action == 'closed' | |
runs-on: ubuntu-latest | |
name: Close Pull Request Job | |
steps: | |
- name: Close Pull Request | |
id: closepullrequest | |
uses: Azure/static-web-apps-deploy@v1 | |
with: | |
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} | |
action: "close" |