From 4326282bf861057dc1dcb2e1d44de763c54fec54 Mon Sep 17 00:00:00 2001 From: arsforza Date: Fri, 7 Feb 2025 11:57:29 +0100 Subject: [PATCH] chore: add southafrica portalicious workflow --- .../deploy_client-southafrica_all.yml | 6 ++ ...deploy_client-southafrica_portalicious.yml | 76 +++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 .github/workflows/deploy_client-southafrica_portalicious.yml diff --git a/.github/workflows/deploy_client-southafrica_all.yml b/.github/workflows/deploy_client-southafrica_all.yml index 76d9c001a3..bc43d8fc65 100644 --- a/.github/workflows/deploy_client-southafrica_all.yml +++ b/.github/workflows/deploy_client-southafrica_all.yml @@ -17,6 +17,12 @@ jobs: secrets: AZURE_STATIC_WEB_APPS_API_TOKEN_PORTAL: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PORTAL }} + deploy_portalicious: + name: 'Build + Deploy: Portalicious' + uses: ./.github/workflows/deploy_client-southafrica_portalicious.yml + secrets: + AZURE_STATIC_WEB_APPS_API_TOKEN_PORTALICIOUS: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PORTALICIOUS }} + deploy_service: name: 'Build + Deploy: 121-Service' uses: ./.github/workflows/deploy_client-southafrica_service.yml diff --git a/.github/workflows/deploy_client-southafrica_portalicious.yml b/.github/workflows/deploy_client-southafrica_portalicious.yml new file mode 100644 index 0000000000..4fb0fe1a79 --- /dev/null +++ b/.github/workflows/deploy_client-southafrica_portalicious.yml @@ -0,0 +1,76 @@ +# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions + +name: 'Deploy [South Africa] Interface: Portalicious' + +env: + workingDirectory: interfaces/Portalicious + +permissions: + actions: read + deployments: write + +on: + workflow_call: + secrets: + AZURE_STATIC_WEB_APPS_API_TOKEN_PORTALICIOUS: + required: true + workflow_dispatch: + +jobs: + build_and_deploy: + name: Build and Deploy Job + runs-on: ubuntu-latest + environment: 'client-southafrica' + env: + NG_ENV_NAME: ${{ vars.NG_ENV_NAME }} + NG_ENV_ICON: ${{ vars.NG_ENV_ICON }} + NG_LOCALES: 'en-GB' + NG_DEFAULT_LOCALE: 'en-GB' + NG_URL_121_SERVICE_API: ${{ vars.NG_URL_121_SERVICE_API }} + USE_IN_TWILIO_FLEX_IFRAME: ${{ vars.USE_IN_TWILIO_FLEX_IFRAME }} + USE_POWERBI_DASHBOARDS: ${{ vars.USE_POWERBI_DASHBOARDS }} + USE_SSO_AZURE_ENTRA: ${{ vars.USE_SSO_AZURE_ENTRA }} + AZURE_ENTRA_CLIENT_ID: ${{ vars.AZURE_ENTRA_CLIENT_ID }} + AZURE_ENTRA_TENANT_ID: ${{ vars.AZURE_ENTRA_TENANT_ID }} + AZURE_ENTRA_URL: ${{ vars.AZURE_ENTRA_URL }} + APPLICATIONINSIGHTS_CONNECTION_STRING: ${{ vars.APPLICATIONINSIGHTS_CONNECTION_STRING }} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Build Interface + id: build + uses: ./.github/actions/build-interface + with: + interfacePath: ${{ env.workingDirectory }} + envIcon: ${{ env.NG_ENV_ICON }} + envIconPath: 'src/assets/favicon.ico' + envContentSecurityPolicy: '' # Not used for Portalicious, the `build:deployment-configuration`-script is used. + + # More information on Static Web App workflow configurations, + # See: https://aka.ms/swaworkflowconfig + - name: Deploy to Azure Static Web App + id: deploy_to_aswa + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PORTALICIOUS }} + repo_token: ${{ secrets.GITHUB_TOKEN }} + action: 'upload' + config_file_location: '${{ env.workingDirectory }}/' + app_location: '${{ env.workingDirectory }}/www' + output_location: '' + skip_app_build: true + skip_api_build: true + + - name: Verify Deployment + if: steps.deploy_to_aswa.outputs.static_web_app_url != '' + working-directory: ${{ env.workingDirectory }} + run: | + npm run verify:deployment-configuration -- --url=${{ steps.deploy_to_aswa.outputs.static_web_app_url }} + + - name: Finish + run: | + echo "Build version: ${{ steps.build.outputs.build_version }}" >> $GITHUB_STEP_SUMMARY + echo "Preview: <${{ steps.deploy_to_aswa.outputs.static_web_app_url }}>" >> $GITHUB_STEP_SUMMARY