Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add South Africa portalicious workflow #6488

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/deploy_client-southafrica_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/deploy_client-southafrica_portalicious.yml
Original file line number Diff line number Diff line change
@@ -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