add hls-copilot to the TOC #1178
Workflow file for this run
This file contains hidden or 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: Test Environment App CI/CD and Deploy | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| pull_request: | |
| types: [opened, synchronize, reopened, closed] | |
| branches: | |
| - develop | |
| jobs: | |
| build_and_deploy_job: | |
| permissions: | |
| pull-requests: write | |
| environment: test | |
| 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 }} | |
| REACT_APP_AZMAPS_KEY: ${{ secrets.AZMAPS_KEY }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - uses: actions/cache@v3 | |
| id: npm-cache | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm- | |
| - name: Build docs and metadata | |
| run: ./scripts/update | |
| - name: Test and lint | |
| run: ./scripts/test | |
| - name: Inject disallow crawling for robots.txt | |
| run: | | |
| echo -e "User-agent: *\nDisallow: /\n" > public/robots.txt | |
| - name: Build optimized bundle | |
| id: build-bundle | |
| run: ./scripts/cibuild | |
| - name: Build And Deploy (Test) | |
| id: builddeploy-test | |
| uses: Azure/static-web-apps-deploy@v1 | |
| with: | |
| azure_static_web_apps_api_token: | |
| ${{ secrets.AZURE_STATIC_WEB_APPS_API_WONDERFUL_STONE_06c70c70f }} | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) | |
| 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_WONDERFUL_STONE_06c70c70f }} | |
| action: "close" |