Skip to content

Fix/110 sign up sign in bff deploy error (#118) #33

Fix/110 sign up sign in bff deploy error (#118)

Fix/110 sign up sign in bff deploy error (#118) #33

name: WebAPP build and deploy
on:
push:
branches:
- main
paths:
- 'apps/client/**'
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to Azure
uses: azure/[email protected]
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Docker login
uses: azure/docker-login@v2
with:
login-server: etherealpulse.azurecr.io
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Create docker image
id: get_image
uses: ./.github/actions/create-image
with:
app: client
- name: Build and push Docker image
run: |
echo "IMAGE_TO_DEPLOY ${{ steps.get_image.outputs.image_to_deploy }}"
cd apps/client
docker build . -t ${{ steps.get_image.outputs.image_to_deploy }}
docker push ${{ steps.get_image.outputs.image_to_deploy }}
- name: Deploy to Azure Container Apps
uses: azure/container-apps-deploy-action@v2
with:
imageToDeploy: ${{ steps.get_image.outputs.image_to_deploy }}
registryUsername: ${{ secrets.REGISTRY_USERNAME }}
registryPassword: ${{ secrets.REGISTRY_PASSWORD }}
containerAppName: ethereal-pulse-webapp
containerAppEnvironment: container-apps-enviroment
resourceGroup: RG-Ethereal-Pulse
location: westeurope
targetPort: 5173
ingress: external
environmentVariables: GITHUB_CLIENT_ID=secretref:github-client-id GITHUB_CLIENT_SECRET=secretref:github-client-secret GITHUB_CALLBACK_URL=secretref:github-callback-url DATABASE_WEBAPP_URI=secretref:database-webapp-uri WEBAPP_PUBLIC_URI=secretref:webapp-public-uri