Skip to content

Merge develop to bring latest changes #82

Merge develop to bring latest changes

Merge develop to bring latest changes #82

name: Production Environment App CI/CD and Deploy
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
jobs:
build_and_deploy_job:
permissions:
pull-requests: write
environment: production
if:
github.event_name == 'push' || (github.event_name == 'pull_request' &&
github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
env:
REACT_APP_API_ROOT: ${{ secrets.API_ROOT }}
REACT_APP_IMAGE_API_ROOT: ${{ secrets.IMAGE_API_ROOT }}
REACT_APP_AZMAPS_CLIENT_ID: ${{ secrets.AZMAPS_CLIENT_ID }}
REACT_APP_ONEDS_TENANT_KEY: ${{ secrets.ONEDS_TENANT_KEY }}
REACT_APP_HUB_URL: ${{ secrets.HUB_URL }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build docs and metadata
run: ./scripts/update
- name: Test and lint
run: ./scripts/test
- name: Build optimized bundle
id: build-bundle
run: ./scripts/cibuild
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token:
${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_THANKFUL_SAND_0ED34C70F }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
skip_deploy_on_missing_secrets: true
action: "upload"
skip_app_build: true
app_location: "build"
api_location: "api"
output_location: "build"
close_pull_request_job:
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_THANKFUL_SAND_0ED34C70F }}
action: "close"