From ea84389a5f505b81b7109ab6ea81158b1355c8fb Mon Sep 17 00:00:00 2001 From: ihebhadjali Date: Wed, 14 Jan 2026 15:24:46 +0100 Subject: [PATCH 01/15] Azur Setup --- .github/workflows/deploy-infra-and-apps.yml | 41 +++++++++++++++++++++ infrastructure/main.bicep | 32 ++++++++++++++++ infrastructure/modules/appService.bicep | 22 +++++++++++ infrastructure/modules/appServicePlan.bicep | 20 ++++++++++ 4 files changed, 115 insertions(+) create mode 100644 .github/workflows/deploy-infra-and-apps.yml create mode 100644 infrastructure/main.bicep create mode 100644 infrastructure/modules/appService.bicep create mode 100644 infrastructure/modules/appServicePlan.bicep diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml new file mode 100644 index 00000000..d3a1eba0 --- /dev/null +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -0,0 +1,41 @@ +on: [push, workflow_dispatch] + +permissions: + # Require write permission to Fetch an OIDC token (required for federated credential) and write it + # It will be automatically used on actions / cli that needs it + id-token: write + +env: + AZURE_RG_NAME: rg-${{ vars.PROJECT_NAME }}-${{ vars.AZURE_RESOURCE_IDENTIFIER }} + +jobs: + deploy_infrastructure: + runs-on: ubuntu-latest + environment: production # bind the job to the production environment + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Login to Azure + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZURE_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + enable-AzPSSession: true + + - name: Create resource group if not exists + run: | + az group show --name ${{ env.AZURE_RG_NAME }} || + az group create --name ${{ env.AZURE_RG_NAME }} --location ${{ secrets.AZURE_REGION }} + + - name: Deploy bicep + id: bicep_deploy + uses: azure/arm-deploy@v2 + with: + subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION }} + region: ${{ secrets.AZURE_REGION }} + template: ./infrastructure/main.bicep + parameters: project=${{ vars.PROJECT_NAME }} location=${{ secrets.AZURE_REGION }} identifier=${{ vars.AZURE_RESOURCE_IDENTIFIER }} + resourceGroupName: ${{ env.AZURE_RG_NAME }} \ No newline at end of file diff --git a/infrastructure/main.bicep b/infrastructure/main.bicep new file mode 100644 index 00000000..22bac17a --- /dev/null +++ b/infrastructure/main.bicep @@ -0,0 +1,32 @@ +targetScope = 'resourceGroup' // We'll deploy the resources in the provided resource group + +// Parameters to easily construct resource names +param location string +param project string + +// Here we'll add an identifier to create a unique name for the App Service Plan, for example your trigram, so that everyone could deploy his own parkndeploy instance +param identifier string + +// Create the AppServicePlan through the AppServicePlan module +module appServicePlan 'modules/appServicePlan.bicep' = { + name: 'appServicePlan' + params: { + location: location + project: project + identifier: identifier + } +} + +// Create the AppService through the AppService module +module appService 'modules/appService.bicep' = { + name: 'appService' + params: { + location: location + project: project + identifier: identifier + planId: appServicePlan.outputs.planId // Use the appServicePlan output to get its id back => an App Service needs to reference its App Service Plan + } +} + +// Export App Service Name +output appServiceName string = appService.outputs.appServiceName diff --git a/infrastructure/modules/appService.bicep b/infrastructure/modules/appService.bicep new file mode 100644 index 00000000..40b49099 --- /dev/null +++ b/infrastructure/modules/appService.bicep @@ -0,0 +1,22 @@ +param location string +param project string +param identifier string + +// App Service Plan identifier that will host our App Service +param planId string + +resource app 'Microsoft.Web/sites@2022-03-01' = { + name: '${project}-app-${identifier}' + location: location + + properties: { + serverFarmId: planId + reserved: true + + siteConfig: { + linuxFxVersion: 'DOTNETCORE|9.0' // Specify to setup the .NET Core 9.0 runtime (used by our backend API) on the Linux machine under the hood + } + } +} + +output appServiceName string = app.name // Export the App Service name for deployment diff --git a/infrastructure/modules/appServicePlan.bicep b/infrastructure/modules/appServicePlan.bicep new file mode 100644 index 00000000..c9b43403 --- /dev/null +++ b/infrastructure/modules/appServicePlan.bicep @@ -0,0 +1,20 @@ +param location string +param project string +param identifier string + +resource plan 'Microsoft.Web/serverfarms@2022-09-01' = { + name: '${project}-plan-${identifier}' + location: location + + sku: { + name: 'F1' // We use F1 pricing plan (free one) as we don't need specific features + } + + kind: 'app,linux' // Allow to deploy on an App Service using Linux OS + + properties: { + reserved: true // Specifity of App Service with Linux OS + } +} + +output planId string = plan.id // Export the App Service identifier From 74d60d3f6bf1c63012220528d99e20740a3e80bd Mon Sep 17 00:00:00 2001 From: Iheb HADJ ALI <57681055+ihebhadjali@users.noreply.github.com> Date: Wed, 14 Jan 2026 15:38:15 +0100 Subject: [PATCH 02/15] Create deploy_backend --- .github/workflows/deploy_backend.yml | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/deploy_backend.yml diff --git a/.github/workflows/deploy_backend.yml b/.github/workflows/deploy_backend.yml new file mode 100644 index 00000000..b2d81cd3 --- /dev/null +++ b/.github/workflows/deploy_backend.yml @@ -0,0 +1,30 @@ +deploy_backend: + runs-on: ubuntu-latest + needs: deploy_infrastructure + environment: production + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup .NET SDK 9.0.x + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '9.0.x' + + - name: Publish the app + run: dotnet publish -c Release --property:PublishDir=publish # Publish the app to the API project publish folder + working-directory: ./backend # Specify where to find the solution file in repository + + - name: Login to Azure + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZURE_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + + - name: Deploy backend to App Service + uses: azure/webapps-deploy@v2 + with: + app-name: ${{ needs.deploy_infrastructure.outputs.appServiceName }} # Access to the previous job output to get the appServiceName deployed with bicep + package: ./backend/ParkNDeploy.Api/publish # Path to the previously published app From 68e65a60970762ddf3ea5c661c8f2e16f329c263 Mon Sep 17 00:00:00 2001 From: Iheb HADJ ALI <57681055+ihebhadjali@users.noreply.github.com> Date: Wed, 14 Jan 2026 15:40:16 +0100 Subject: [PATCH 03/15] Update deploy-infrastructure --- .github/workflows/deploy-infra-and-apps.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index d3a1eba0..a8df9104 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -13,6 +13,9 @@ jobs: runs-on: ubuntu-latest environment: production # bind the job to the production environment + outputs: + appServiceName: ${{ steps.bicep_deploy.outputs.appServiceName }} + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -38,4 +41,4 @@ jobs: region: ${{ secrets.AZURE_REGION }} template: ./infrastructure/main.bicep parameters: project=${{ vars.PROJECT_NAME }} location=${{ secrets.AZURE_REGION }} identifier=${{ vars.AZURE_RESOURCE_IDENTIFIER }} - resourceGroupName: ${{ env.AZURE_RG_NAME }} \ No newline at end of file + resourceGroupName: ${{ env.AZURE_RG_NAME }} From 18768012449359ed4c8110027b67515bb14db81b Mon Sep 17 00:00:00 2001 From: ihebhadjali Date: Wed, 14 Jan 2026 15:49:09 +0100 Subject: [PATCH 04/15] Edit Workflows --- .github/workflows/deploy-infra-and-apps.yml | 31 +++++++++++++++++++++ .github/workflows/deploy_backend.yml | 30 -------------------- 2 files changed, 31 insertions(+), 30 deletions(-) delete mode 100644 .github/workflows/deploy_backend.yml diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index a8df9104..9b72e974 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -42,3 +42,34 @@ jobs: template: ./infrastructure/main.bicep parameters: project=${{ vars.PROJECT_NAME }} location=${{ secrets.AZURE_REGION }} identifier=${{ vars.AZURE_RESOURCE_IDENTIFIER }} resourceGroupName: ${{ env.AZURE_RG_NAME }} + + deploy_backend: + runs-on: ubuntu-latest + needs: deploy_infrastructure + environment: production + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup .NET SDK 9.0.x + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '9.0.x' + + - name: Publish the app + run: dotnet publish -c Release --property:PublishDir=publish # Publish the app to the API project publish folder + working-directory: ./backend # Specify where to find the solution file in repository + + - name: Login to Azure + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZURE_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + + - name: Deploy backend to App Service + uses: azure/webapps-deploy@v2 + with: + app-name: ${{ needs.deploy_infrastructure.outputs.appServiceName }} # Access to the previous job output to get the appServiceName deployed with bicep + package: ./backend/ParkNDeploy.Api/publish # Path to the previously published app \ No newline at end of file diff --git a/.github/workflows/deploy_backend.yml b/.github/workflows/deploy_backend.yml deleted file mode 100644 index b2d81cd3..00000000 --- a/.github/workflows/deploy_backend.yml +++ /dev/null @@ -1,30 +0,0 @@ -deploy_backend: - runs-on: ubuntu-latest - needs: deploy_infrastructure - environment: production - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup .NET SDK 9.0.x - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '9.0.x' - - - name: Publish the app - run: dotnet publish -c Release --property:PublishDir=publish # Publish the app to the API project publish folder - working-directory: ./backend # Specify where to find the solution file in repository - - - name: Login to Azure - uses: azure/login@v2 - with: - client-id: ${{ secrets.AZURE_CLIENT_ID }} - tenant-id: ${{ secrets.AZURE_TENANT_ID }} - subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - - - name: Deploy backend to App Service - uses: azure/webapps-deploy@v2 - with: - app-name: ${{ needs.deploy_infrastructure.outputs.appServiceName }} # Access to the previous job output to get the appServiceName deployed with bicep - package: ./backend/ParkNDeploy.Api/publish # Path to the previously published app From 063d9564471974f6a602bcb9e8484c8d87060585 Mon Sep 17 00:00:00 2001 From: ihebhadjali Date: Wed, 14 Jan 2026 16:09:49 +0100 Subject: [PATCH 05/15] Edit Deploy Infrastructure --- .github/workflows/deploy-infra-and-apps.yml | 4 ++-- infrastructure/main.bicep | 19 +++++++++++++++++-- infrastructure/modules/staticWebApp.bicep | 16 ++++++++++++++++ 3 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 infrastructure/modules/staticWebApp.bicep diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index 9b72e974..e50ec411 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -40,9 +40,9 @@ jobs: subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION }} region: ${{ secrets.AZURE_REGION }} template: ./infrastructure/main.bicep - parameters: project=${{ vars.PROJECT_NAME }} location=${{ secrets.AZURE_REGION }} identifier=${{ vars.AZURE_RESOURCE_IDENTIFIER }} + parameters: project=${{ vars.PROJECT_NAME }} location=${{ secrets.AZURE_REGION }} swaLocation=${{ secrets.AZURE_SWA_REGION }} identifier=${{ vars.AZURE_RESOURCE_IDENTIFIER }} resourceGroupName: ${{ env.AZURE_RG_NAME }} - + deploy_backend: runs-on: ubuntu-latest needs: deploy_infrastructure diff --git a/infrastructure/main.bicep b/infrastructure/main.bicep index 22bac17a..a4b236b7 100644 --- a/infrastructure/main.bicep +++ b/infrastructure/main.bicep @@ -28,5 +28,20 @@ module appService 'modules/appService.bicep' = { } } -// Export App Service Name -output appServiceName string = appService.outputs.appServiceName +param swaLocation string // Static Web App locations are limited, we need to add another variable + +// App Service & App Service Plan creation +// ... + +// Create the Static Web App through the StaticWebApp module +module staticWebApp 'modules/staticWebApp.bicep' = { + name: 'staticWebApp' + params: { + location: swaLocation + project: project + identifier: identifier + } +} + +output appServiceName string = appService.outputs.appServiceName // Export AppServiceName in order to deploy the API later on +output staticWebAppName string = staticWebApp.outputs.swaName // Export StaticWebAppName in order to deploy the Frontend late diff --git a/infrastructure/modules/staticWebApp.bicep b/infrastructure/modules/staticWebApp.bicep new file mode 100644 index 00000000..cd780056 --- /dev/null +++ b/infrastructure/modules/staticWebApp.bicep @@ -0,0 +1,16 @@ +param location string +param project string +param identifier string + +resource swa 'Microsoft.Web/staticSites@2024-04-01' = { + name: '${project}-swa-${identifier}' + location: location + + sku: { + name: 'Free' + } + + properties: {} // Even empty, it's mandatory ... +} + +output swaName string = swa.name // Expose Static Web App name as we did for App Service for deployment purpose From ff66c0ad296635a90dc232a8552f0d2e096839eb Mon Sep 17 00:00:00 2001 From: ihebhadjali Date: Wed, 14 Jan 2026 16:43:01 +0100 Subject: [PATCH 06/15] Add Deploy Frontend App --- .github/workflows/deploy-infra-and-apps.yml | 31 ++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index e50ec411..8ee55bd0 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -15,6 +15,7 @@ jobs: outputs: appServiceName: ${{ steps.bicep_deploy.outputs.appServiceName }} + staticWebAppName: ${{ steps.bicep_deploy.outputs.staticWebAppName }} steps: - name: Checkout repository @@ -72,4 +73,32 @@ jobs: uses: azure/webapps-deploy@v2 with: app-name: ${{ needs.deploy_infrastructure.outputs.appServiceName }} # Access to the previous job output to get the appServiceName deployed with bicep - package: ./backend/ParkNDeploy.Api/publish # Path to the previously published app \ No newline at end of file + package: ./backend/ParkNDeploy.Api/publish # Path to the previously published app + + deploy_frontend: + runs-on: ubuntu-latest + needs: deploy_infrastructure + environment: production + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Build the app + run: npm install && npm run build + working-directory: ./frontend + + - name: Login to Azure + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZURE_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + + - name: Deploy frontend to Static Web App + uses: azure/static-web-apps-deploy@v1 + with: + app_location: frontend/dist + action: upload + skip_app_build: true + skip_api_build: true \ No newline at end of file From 79dc1ee8186283343bc1453b91b827fc71985c6b Mon Sep 17 00:00:00 2001 From: ihebhadjali Date: Wed, 14 Jan 2026 17:04:03 +0100 Subject: [PATCH 07/15] Edit Deploy Frontend App --- .github/workflows/deploy-infra-and-apps.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index 8ee55bd0..99085ffb 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -94,10 +94,16 @@ jobs: client-id: ${{ secrets.AZURE_CLIENT_ID }} tenant-id: ${{ secrets.AZURE_TENANT_ID }} subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + + - name: Get Static Web App deployment token + run: | + SWA_DEPLOYMENT_TOKEN=$(az staticwebapp secrets list -n ${{ needs.deploy_infrastructure.outputs.staticWebAppName }} -o tsv --query properties.apiKey) + echo SWA_DEPLOYMENT_TOKEN=$SWA_DEPLOYMENT_TOKEN >> $GITHUB_ENV - name: Deploy frontend to Static Web App uses: azure/static-web-apps-deploy@v1 with: + azure_static_web_apps_api_token: ${{ env.SWA_DEPLOYMENT_TOKEN }} app_location: frontend/dist action: upload skip_app_build: true From d9c8bfa37a167c977447c0ee6fb4bc7dee8bc09f Mon Sep 17 00:00:00 2001 From: ihebhadjali Date: Wed, 14 Jan 2026 17:13:21 +0100 Subject: [PATCH 08/15] Frontend Infrastructure update --- infrastructure/main.bicep | 9 +++++++++ infrastructure/modules/appService.bicep | 2 ++ infrastructure/modules/staticWebApp.bicep | 7 ++++--- infrastructure/modules/staticWebAppBackend.bicep | 11 +++++++++++ 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 infrastructure/modules/staticWebAppBackend.bicep diff --git a/infrastructure/main.bicep b/infrastructure/main.bicep index a4b236b7..a96683c9 100644 --- a/infrastructure/main.bicep +++ b/infrastructure/main.bicep @@ -43,5 +43,14 @@ module staticWebApp 'modules/staticWebApp.bicep' = { } } +module staticWebAppBackend 'modules/staticWebAppBackend.bicep' = { + name: 'staticWebAppBackend' + params: { + backendBindedResourceId: appService.outputs.appServiceId + swaName: staticWebApp.outputs.swaName + location: location + } +} + output appServiceName string = appService.outputs.appServiceName // Export AppServiceName in order to deploy the API later on output staticWebAppName string = staticWebApp.outputs.swaName // Export StaticWebAppName in order to deploy the Frontend late diff --git a/infrastructure/modules/appService.bicep b/infrastructure/modules/appService.bicep index 40b49099..5caaed46 100644 --- a/infrastructure/modules/appService.bicep +++ b/infrastructure/modules/appService.bicep @@ -20,3 +20,5 @@ resource app 'Microsoft.Web/sites@2022-03-01' = { } output appServiceName string = app.name // Export the App Service name for deployment + +output appServiceId string = app.id diff --git a/infrastructure/modules/staticWebApp.bicep b/infrastructure/modules/staticWebApp.bicep index cd780056..25fde555 100644 --- a/infrastructure/modules/staticWebApp.bicep +++ b/infrastructure/modules/staticWebApp.bicep @@ -6,9 +6,10 @@ resource swa 'Microsoft.Web/staticSites@2024-04-01' = { name: '${project}-swa-${identifier}' location: location - sku: { - name: 'Free' - } + sku: { + name: 'Standard' + tier: 'Standard' + } properties: {} // Even empty, it's mandatory ... } diff --git a/infrastructure/modules/staticWebAppBackend.bicep b/infrastructure/modules/staticWebAppBackend.bicep new file mode 100644 index 00000000..4e902770 --- /dev/null +++ b/infrastructure/modules/staticWebAppBackend.bicep @@ -0,0 +1,11 @@ +param backendBindedResourceId string +param swaName string +param location string + +resource staticWebAppBackend 'Microsoft.Web/staticSites/linkedBackends@2022-03-01' = { + name: '${swaName}/backend' + properties: { + backendResourceId: backendBindedResourceId + region: location + } +} From 9e1b81c85fc4ffad1ad6fa79325c74624e8e3b5e Mon Sep 17 00:00:00 2001 From: ihebhadjali Date: Tue, 20 Jan 2026 10:30:37 +0100 Subject: [PATCH 09/15] Modification workflow --- .github/workflows/deploy-infra-and-apps.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index 99085ffb..5646df0a 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -1,4 +1,8 @@ -on: [push, workflow_dispatch] +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + workflow_dispatch: permissions: # Require write permission to Fetch an OIDC token (required for federated credential) and write it From b166d94b853eaf6dc1b87ca18194de8297db3d54 Mon Sep 17 00:00:00 2001 From: ihebhadjali Date: Tue, 20 Jan 2026 10:46:23 +0100 Subject: [PATCH 10/15] =?UTF-8?q?Ajout=20version=20dans=20variable=20d?= =?UTF-8?q?=E2=80=99environnement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-infra-and-apps.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index 5646df0a..881bcdca 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -11,6 +11,7 @@ permissions: env: AZURE_RG_NAME: rg-${{ vars.PROJECT_NAME }}-${{ vars.AZURE_RESOURCE_IDENTIFIER }} + APP_VERSION: ${{ github.ref_name }} jobs: deploy_infrastructure: @@ -47,6 +48,8 @@ jobs: template: ./infrastructure/main.bicep parameters: project=${{ vars.PROJECT_NAME }} location=${{ secrets.AZURE_REGION }} swaLocation=${{ secrets.AZURE_SWA_REGION }} identifier=${{ vars.AZURE_RESOURCE_IDENTIFIER }} resourceGroupName: ${{ env.AZURE_RG_NAME }} + - name: Print version + run: echo "App version est $APP_VERSION" deploy_backend: runs-on: ubuntu-latest From ef30ef222edfbb9e20df1a1afb2838b58da13be1 Mon Sep 17 00:00:00 2001 From: ihebhadjali Date: Tue, 20 Jan 2026 11:18:47 +0100 Subject: [PATCH 11/15] Ajout workflow CI pipeline --- .github/workflows/ci-merge.yml | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/ci-merge.yml diff --git a/.github/workflows/ci-merge.yml b/.github/workflows/ci-merge.yml new file mode 100644 index 00000000..cbd3fd9c --- /dev/null +++ b/.github/workflows/ci-merge.yml @@ -0,0 +1,49 @@ +on: + pull_request: + branches: + - main + +env: + APP_VERSION: ${{ github.ref_name }} + +jobs: + build_frontend: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run lint + run: npm run lint + working-directory: ./frontend + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '21' + cache: 'npm' + + - name: Install dependencies + run: npm install + working-directory: ./frontend + + - name: Build React app + run: npm run build + working-directory: ./frontend + + build_backend: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup .NET SDK 9.0.x + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '9.0.x' + + - name: Build .NET app + run: dotnet build --configuration Release + working-directory: ./backend \ No newline at end of file From 2d092bd12014e5f5974543bf7bfb0ed48d724ca0 Mon Sep 17 00:00:00 2001 From: ihebhadjali Date: Tue, 20 Jan 2026 11:33:29 +0100 Subject: [PATCH 12/15] Correction workflow CI Pipline --- .github/workflows/ci-merge.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci-merge.yml b/.github/workflows/ci-merge.yml index cbd3fd9c..19caa967 100644 --- a/.github/workflows/ci-merge.yml +++ b/.github/workflows/ci-merge.yml @@ -1,7 +1,4 @@ -on: - pull_request: - branches: - - main +on: [pull_request, workflow_dispatch] env: APP_VERSION: ${{ github.ref_name }} From 0d6018be09c4e56538ccacc2f673b6797a2211b8 Mon Sep 17 00:00:00 2001 From: ihebhadjali Date: Tue, 20 Jan 2026 11:36:44 +0100 Subject: [PATCH 13/15] Correction 2 workfow CI pipline --- .github/workflows/ci-merge.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci-merge.yml b/.github/workflows/ci-merge.yml index 19caa967..e39cbea6 100644 --- a/.github/workflows/ci-merge.yml +++ b/.github/workflows/ci-merge.yml @@ -15,12 +15,6 @@ jobs: run: npm run lint working-directory: ./frontend - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: '21' - cache: 'npm' - - name: Install dependencies run: npm install working-directory: ./frontend From c36677b65cdc1325cd618a94affeba77ba67dae3 Mon Sep 17 00:00:00 2001 From: ihebhadjali Date: Tue, 20 Jan 2026 11:40:57 +0100 Subject: [PATCH 14/15] Correction 3 workfow CI pipline --- .github/workflows/ci-merge.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-merge.yml b/.github/workflows/ci-merge.yml index e39cbea6..7cc1e618 100644 --- a/.github/workflows/ci-merge.yml +++ b/.github/workflows/ci-merge.yml @@ -1,11 +1,9 @@ on: [pull_request, workflow_dispatch] - -env: - APP_VERSION: ${{ github.ref_name }} - + jobs: build_frontend: runs-on: ubuntu-latest + environment: production steps: - name: Checkout code @@ -25,6 +23,7 @@ jobs: build_backend: runs-on: ubuntu-latest + environment: production steps: - name: Checkout repository From 53c28e40cf5a71d5ee2c555eaf8955dc2d3531c1 Mon Sep 17 00:00:00 2001 From: ihebhadjali Date: Tue, 20 Jan 2026 11:44:32 +0100 Subject: [PATCH 15/15] Correction 4 workfow CI pipline --- .github/workflows/ci-merge.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-merge.yml b/.github/workflows/ci-merge.yml index 7cc1e618..f1ffa1c6 100644 --- a/.github/workflows/ci-merge.yml +++ b/.github/workflows/ci-merge.yml @@ -9,10 +9,6 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Run lint - run: npm run lint - working-directory: ./frontend - - name: Install dependencies run: npm install working-directory: ./frontend @@ -21,6 +17,10 @@ jobs: run: npm run build working-directory: ./frontend + - name: Run lint + run: npm run lint + working-directory: ./frontend + build_backend: runs-on: ubuntu-latest environment: production