From e0130063128a2fb06b6420dab654b4f96a90fbc4 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 14 Jan 2026 14:23:17 +0100 Subject: [PATCH 01/25] premiers ajouts --- .github/workflows/deploy-infra-and-apps.yml | 35 +++++++++++++++++++++ infrastructure/main.bicep | 32 +++++++++++++++++++ infrastructure/module/appService.bicep | 22 +++++++++++++ infrastructure/module/appServicePlan.bicep | 20 ++++++++++++ 4 files changed, 109 insertions(+) create mode 100644 .github/workflows/deploy-infra-and-apps.yml create mode 100644 infrastructure/main.bicep create mode 100644 infrastructure/module/appService.bicep create mode 100644 infrastructure/module/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..7b6de93d --- /dev/null +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -0,0 +1,35 @@ +on: [push, workflow_dispatch] + +env: + AZURE_RG_NAME: rg-${{ vars.PROJECT_NAME }}-${{ vars.AZURE_RESOURCE_IDENTIFIER }} + +jobs: + deploy_infrastructure: + runs-on: ubuntu-latest + + 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..22252465 --- /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 \ No newline at end of file diff --git a/infrastructure/module/appService.bicep b/infrastructure/module/appService.bicep new file mode 100644 index 00000000..40b49099 --- /dev/null +++ b/infrastructure/module/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/module/appServicePlan.bicep b/infrastructure/module/appServicePlan.bicep new file mode 100644 index 00000000..c9b43403 --- /dev/null +++ b/infrastructure/module/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 d62500e005e34756d2433cb9d8dacd02f53917cc Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 14 Jan 2026 14:27:48 +0100 Subject: [PATCH 02/25] changement de nom --- infrastructure/main.bicep | 2 +- infrastructure/{module => modules}/appService.bicep | 0 infrastructure/{module => modules}/appServicePlan.bicep | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename infrastructure/{module => modules}/appService.bicep (100%) rename infrastructure/{module => modules}/appServicePlan.bicep (100%) diff --git a/infrastructure/main.bicep b/infrastructure/main.bicep index 22252465..22bac17a 100644 --- a/infrastructure/main.bicep +++ b/infrastructure/main.bicep @@ -29,4 +29,4 @@ module appService 'modules/appService.bicep' = { } // Export App Service Name -output appServiceName string = appService.outputs.appServiceName \ No newline at end of file +output appServiceName string = appService.outputs.appServiceName diff --git a/infrastructure/module/appService.bicep b/infrastructure/modules/appService.bicep similarity index 100% rename from infrastructure/module/appService.bicep rename to infrastructure/modules/appService.bicep diff --git a/infrastructure/module/appServicePlan.bicep b/infrastructure/modules/appServicePlan.bicep similarity index 100% rename from infrastructure/module/appServicePlan.bicep rename to infrastructure/modules/appServicePlan.bicep From cb0de718a0c51c49093f1f8f601616ee0a1cda67 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 14 Jan 2026 14:56:40 +0100 Subject: [PATCH 03/25] changement dans le yalm --- .github/workflows/deploy-infra-and-apps.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index 7b6de93d..fa41df2d 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -1,7 +1,16 @@ 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 }} + +deploy_infrastructure: + runs-on: ubuntu-latest + environment: production # bind the job to the production environment jobs: deploy_infrastructure: From 8e9779924a7c0b1fbe36ee740dc258a602167716 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 14 Jan 2026 15:00:12 +0100 Subject: [PATCH 04/25] remodif yaml --- .github/workflows/deploy-infra-and-apps.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index fa41df2d..d3a1eba0 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -7,14 +7,11 @@ permissions: env: AZURE_RG_NAME: rg-${{ vars.PROJECT_NAME }}-${{ vars.AZURE_RESOURCE_IDENTIFIER }} - -deploy_infrastructure: - runs-on: ubuntu-latest - environment: production # bind the job to the production environment jobs: deploy_infrastructure: runs-on: ubuntu-latest + environment: production # bind the job to the production environment steps: - name: Checkout repository From b52aae3103f4f8cee8801f00c172d8892bbec275 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 14 Jan 2026 15:54:08 +0100 Subject: [PATCH 05/25] Modif yalm --- .github/workflows/deploy-infra-and-apps.yml | 37 ++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index d3a1eba0..e0a029e4 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,36 @@ 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 }} + +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 3775c2381c5593290a58dc39ae0a1148533ef3f9 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 14 Jan 2026 15:58:17 +0100 Subject: [PATCH 06/25] modif pour essayer d'avoir l'api --- .github/workflows/deploy-infra-and-apps.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index e0a029e4..d77807cc 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -13,8 +13,7 @@ jobs: runs-on: ubuntu-latest environment: production # bind the job to the production environment - outputs: - appServiceName: ${{ steps.bicep_deploy.outputs.appServiceName }} + outputs: appServiceName: ${{ steps.bicep_deploy.outputs.appServiceName }} steps: - name: Checkout repository From 7b3333313bf25c668d31e10631ab03c0d6abf148 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 14 Jan 2026 15:59:35 +0100 Subject: [PATCH 07/25] encore --- .github/workflows/deploy-infra-and-apps.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index d77807cc..65746964 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -13,7 +13,8 @@ jobs: runs-on: ubuntu-latest environment: production # bind the job to the production environment - outputs: appServiceName: ${{ steps.bicep_deploy.outputs.appServiceName }} + outputs: + appServiceName: ${{ steps.bicep_deploy.outputs.appServiceName }} steps: - name: Checkout repository From 63d8f387b43a54dd946101de83c86bd137c4ca79 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 14 Jan 2026 16:01:09 +0100 Subject: [PATCH 08/25] encore 1 --- .github/workflows/deploy-infra-and-apps.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index 65746964..4a27bdd6 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -43,7 +43,8 @@ jobs: parameters: project=${{ vars.PROJECT_NAME }} location=${{ secrets.AZURE_REGION }} identifier=${{ vars.AZURE_RESOURCE_IDENTIFIER }} resourceGroupName: ${{ env.AZURE_RG_NAME }} -deploy_backend: + + deploy_backend: runs-on: ubuntu-latest needs: deploy_infrastructure environment: production From 677b41f0380ce8538803568db9c1eb5af1d6607c Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 14 Jan 2026 16:46:41 +0100 Subject: [PATCH 09/25] nouveau --- .github/workflows/deploy-infra-and-apps.yml | 3 +-- infrastructure/main.bicep | 16 ++++++++++++++++ infrastructure/modules/staticWebApp.bicep | 16 ++++++++++++++++ 3 files changed, 33 insertions(+), 2 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 4a27bdd6..d605385a 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -40,10 +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..b0967aec 100644 --- a/infrastructure/main.bicep +++ b/infrastructure/main.bicep @@ -17,6 +17,7 @@ module appServicePlan 'modules/appServicePlan.bicep' = { } } + // Create the AppService through the AppService module module appService 'modules/appService.bicep' = { name: 'appService' @@ -28,5 +29,20 @@ module appService 'modules/appService.bicep' = { } } +param swaLocation string // Static Web App locations are limited, we need to add another variable + +// Create the Static Web App through the StaticWebApp module +module staticWebApp 'modules/staticWebApp.bicep' = { + name: 'staticWebApp' + params: { + location: swaLocation + project: project + identifier: identifier + } +} + + + // Export App Service Name output appServiceName string = appService.outputs.appServiceName +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 ea36234dc86bece3be8f56b335149e44939e62c6 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 14 Jan 2026 16:54:46 +0100 Subject: [PATCH 10/25] deploy_frontend --- .github/workflows/deploy-infra-and-apps.yml | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index d605385a..855e1f0b 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 @@ -73,4 +74,31 @@ jobs: 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 + + 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 dd2c8a84052fd65a6f7dfce05dcb62fd202948be Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 14 Jan 2026 17:01:22 +0100 Subject: [PATCH 11/25] conf encore --- .github/workflows/deploy-infra-and-apps.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index 855e1f0b..53ad36be 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -74,7 +74,7 @@ jobs: 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 - + deploy_frontend: runs-on: ubuntu-latest needs: deploy_infrastructure @@ -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 2ecb9376d21d3f52f4638b2e0e85c483d307e629 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 14 Jan 2026 17:14:37 +0100 Subject: [PATCH 12/25] test connection front end back end --- infrastructure/main.bicep | 9 ++++++++- infrastructure/modules/appService.bicep | 1 + infrastructure/modules/staticWebApp.bicep | 9 ++++++--- infrastructure/modules/staticWebAppBackend.bicep | 11 +++++++++++ 4 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 infrastructure/modules/staticWebAppBackend.bicep diff --git a/infrastructure/main.bicep b/infrastructure/main.bicep index b0967aec..c42362d7 100644 --- a/infrastructure/main.bicep +++ b/infrastructure/main.bicep @@ -41,7 +41,14 @@ module staticWebApp 'modules/staticWebApp.bicep' = { } } - +module staticWebAppBackend 'modules/staticWebAppBackend.bicep' = { + name: 'staticWebAppBackend' + params: { + backendBindedResourceId: appService.outputs.appServiceId + swaName: staticWebApp.outputs.swaName + location: location + } +} // Export App Service Name output appServiceName string = appService.outputs.appServiceName diff --git a/infrastructure/modules/appService.bicep b/infrastructure/modules/appService.bicep index 40b49099..dbe7a75b 100644 --- a/infrastructure/modules/appService.bicep +++ b/infrastructure/modules/appService.bicep @@ -20,3 +20,4 @@ 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..b1886e33 100644 --- a/infrastructure/modules/staticWebApp.bicep +++ b/infrastructure/modules/staticWebApp.bicep @@ -6,11 +6,14 @@ 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 ... } + + output swaName string = swa.name // Expose Static Web App name as we did for App Service for deployment purpose 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 5d446fb2e4b76e67281ded6d2d0df5f03bd59cb4 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 20 Jan 2026 09:42:05 +0100 Subject: [PATCH 13/25] test git tags --- .github/workflows/deploy-infra-and-apps.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index 53ad36be..de9cb000 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -1,4 +1,4 @@ -on: [push, workflow_dispatch] +on: [tag, workflow_dispatch] permissions: # Require write permission to Fetch an OIDC token (required for federated credential) and write it From 6eb440a7fc12637865347419f5407f012c5bf525 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 20 Jan 2026 09:48:59 +0100 Subject: [PATCH 14/25] =?UTF-8?q?retour=20=C3=A0=20l'ancienne=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-infra-and-apps.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index de9cb000..53ad36be 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -1,4 +1,4 @@ -on: [tag, workflow_dispatch] +on: [push, workflow_dispatch] permissions: # Require write permission to Fetch an OIDC token (required for federated credential) and write it From 1bdab1ecc5ed9c60451bcce2ea80542d0dac399d Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 20 Jan 2026 10:22:26 +0100 Subject: [PATCH 15/25] modif du yalm --- .github/workflows/deploy-infra-and-apps.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index 53ad36be..701111ea 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -1,4 +1,9 @@ -on: [push, workflow_dispatch] +#on: [push, workflow_dispatch] +on: + push: + tags: + - '[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 17accc0a2716c038f84bd56f088e9d52624198ef Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 20 Jan 2026 11:34:26 +0100 Subject: [PATCH 16/25] chocapics --- .github/workflows/deploy-infra-Q2.yml | 47 +++++++++++++++++++++++++++ frontend/tsconfig.app.tsbuildinfo | 1 + frontend/tsconfig.node.tsbuildinfo | 1 + 3 files changed, 49 insertions(+) create mode 100644 .github/workflows/deploy-infra-Q2.yml create mode 100644 frontend/tsconfig.app.tsbuildinfo create mode 100644 frontend/tsconfig.node.tsbuildinfo diff --git a/.github/workflows/deploy-infra-Q2.yml b/.github/workflows/deploy-infra-Q2.yml new file mode 100644 index 00000000..f1345f6c --- /dev/null +++ b/.github/workflows/deploy-infra-Q2.yml @@ -0,0 +1,47 @@ +on: [pull_request, 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 + + +jobs: + deploy_infrastructure: + runs-on: ubuntu-latest + environment: production + + deploy_backend: + runs-on: ubuntu-latest + environment: production + needs: deploy_infrastructure + + 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 + + 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: Build the lint + run: run lint + working-directory: ./frontend \ No newline at end of file diff --git a/frontend/tsconfig.app.tsbuildinfo b/frontend/tsconfig.app.tsbuildinfo new file mode 100644 index 00000000..dddf5a6f --- /dev/null +++ b/frontend/tsconfig.app.tsbuildinfo @@ -0,0 +1 @@ +{"root":["./vite.config.ts","./src/app.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/api/axiosclient.ts","./src/api/queryclient.ts","./src/api/services/parkingsangersservice/contracts.ts","./src/api/services/parkingsangersservice/enpoints.ts","./src/api/services/parkingsangersservice/queries.ts","./src/api/services/parkingsangersservice/service.ts","./src/components/parkinglist/parkinglist.tsx","./src/components/parkinglist/parkinglistfilters.tsx","./src/components/ui/card.tsx","./src/components/ui/input.tsx","./src/components/ui/loadingspinner.tsx","./src/hooks/usedebounce.ts","./src/lib/utils.ts","./src/stores/parkingsearchstore.ts"],"version":"5.9.2"} \ No newline at end of file diff --git a/frontend/tsconfig.node.tsbuildinfo b/frontend/tsconfig.node.tsbuildinfo new file mode 100644 index 00000000..240b8923 --- /dev/null +++ b/frontend/tsconfig.node.tsbuildinfo @@ -0,0 +1 @@ +{"root":["./vite.config.ts"],"version":"5.9.2"} \ No newline at end of file From add536dc891222fac549ede82e335445ebdd71c8 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 20 Jan 2026 11:41:48 +0100 Subject: [PATCH 17/25] tessst --- .github/workflows/deploy-infra-Q2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-infra-Q2.yml b/.github/workflows/deploy-infra-Q2.yml index f1345f6c..2f862f31 100644 --- a/.github/workflows/deploy-infra-Q2.yml +++ b/.github/workflows/deploy-infra-Q2.yml @@ -1,4 +1,4 @@ -on: [pull_request, workflow_dispatch] +on: [pull_request] permissions: # Require write permission to Fetch an OIDC token (required for federated credential) and write it @@ -13,8 +13,8 @@ jobs: deploy_backend: runs-on: ubuntu-latest - environment: production needs: deploy_infrastructure + environment: production steps: - name: Checkout repository From 4d1b5c4523df4120160787572ca42f89a2608bd7 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 20 Jan 2026 11:43:26 +0100 Subject: [PATCH 18/25] alllez --- .github/workflows/deploy-infra-Q2.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/deploy-infra-Q2.yml b/.github/workflows/deploy-infra-Q2.yml index 2f862f31..4ad0196e 100644 --- a/.github/workflows/deploy-infra-Q2.yml +++ b/.github/workflows/deploy-infra-Q2.yml @@ -7,9 +7,6 @@ permissions: jobs: - deploy_infrastructure: - runs-on: ubuntu-latest - environment: production deploy_backend: runs-on: ubuntu-latest From 03fd489260d06fe0855e04156963d782a3e7aa9d Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 20 Jan 2026 11:44:47 +0100 Subject: [PATCH 19/25] test --- .github/workflows/deploy-infra-Q2.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy-infra-Q2.yml b/.github/workflows/deploy-infra-Q2.yml index 4ad0196e..d775e47b 100644 --- a/.github/workflows/deploy-infra-Q2.yml +++ b/.github/workflows/deploy-infra-Q2.yml @@ -7,7 +7,6 @@ permissions: jobs: - deploy_backend: runs-on: ubuntu-latest needs: deploy_infrastructure From 88c81e11e6ddfa5cb4229424e3a4f5e4b2ad0ac4 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 20 Jan 2026 11:47:47 +0100 Subject: [PATCH 20/25] rohhhhhhhhh --- .github/workflows/deploy-infra-Q2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-infra-Q2.yml b/.github/workflows/deploy-infra-Q2.yml index d775e47b..48c3e82c 100644 --- a/.github/workflows/deploy-infra-Q2.yml +++ b/.github/workflows/deploy-infra-Q2.yml @@ -25,7 +25,7 @@ jobs: 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 - deploy_frontend: + deploy_frontend_Pipeline: runs-on: ubuntu-latest needs: deploy_infrastructure environment: production From 32fbb4a114e9533365e65eb360e60e25ead27d0f Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 20 Jan 2026 11:50:46 +0100 Subject: [PATCH 21/25] allezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz --- .github/workflows/deploy-infra-Q2.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/deploy-infra-Q2.yml b/.github/workflows/deploy-infra-Q2.yml index 48c3e82c..928ec5e5 100644 --- a/.github/workflows/deploy-infra-Q2.yml +++ b/.github/workflows/deploy-infra-Q2.yml @@ -9,7 +9,6 @@ permissions: jobs: deploy_backend: runs-on: ubuntu-latest - needs: deploy_infrastructure environment: production steps: @@ -27,7 +26,6 @@ jobs: deploy_frontend_Pipeline: runs-on: ubuntu-latest - needs: deploy_infrastructure environment: production steps: From c371b0b2b9b886e353fa03d16a0abcff6bf0ce3b Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 20 Jan 2026 12:11:16 +0100 Subject: [PATCH 22/25] hfvqrjdqvbjkrs --- .github/workflows/deploy-infra-Q2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-infra-Q2.yml b/.github/workflows/deploy-infra-Q2.yml index 928ec5e5..34a148f3 100644 --- a/.github/workflows/deploy-infra-Q2.yml +++ b/.github/workflows/deploy-infra-Q2.yml @@ -37,5 +37,5 @@ jobs: working-directory: ./frontend - name: Build the lint - run: run lint + run: npm run lint working-directory: ./frontend \ No newline at end of file From 8db1197b3441b82076e4f602ba71bdf2a80e6523 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 20 Jan 2026 12:16:43 +0100 Subject: [PATCH 23/25] sqdihvbqbqjvhbq --- .github/workflows/deploy-infra-Q2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-infra-Q2.yml b/.github/workflows/deploy-infra-Q2.yml index 34a148f3..aaafcde3 100644 --- a/.github/workflows/deploy-infra-Q2.yml +++ b/.github/workflows/deploy-infra-Q2.yml @@ -5,7 +5,7 @@ permissions: # It will be automatically used on actions / cli that needs it id-token: write - + ###" fvdfbsfbsfbsfbsb jobs: deploy_backend: runs-on: ubuntu-latest From 68aed23004c2e53c8c50f5e4e515b1b8e99727a2 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 21 Jan 2026 14:13:34 +0100 Subject: [PATCH 24/25] Test juste du build --- .github/workflows/deploy-infra-and-apps.yml | 198 ++++++++++++-------- 1 file changed, 125 insertions(+), 73 deletions(-) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index 701111ea..87cddb0a 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -1,3 +1,121 @@ +# #on: [push, workflow_dispatch] +# on: +# push: +# tags: +# - '[0-9]+.[0-9]+.[0-9]+' +# 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 + +# outputs: +# appServiceName: ${{ steps.bicep_deploy.outputs.appServiceName }} +# staticWebAppName: ${{ steps.bicep_deploy.outputs.staticWebAppName }} + +# 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 }} swaLocation=${{ secrets.AZURE_SWA_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 + +# 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: 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 +# skip_api_build: true + + + #on: [push, workflow_dispatch] on: push: @@ -12,46 +130,11 @@ permissions: 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 - - outputs: - appServiceName: ${{ steps.bicep_deploy.outputs.appServiceName }} - staticWebAppName: ${{ steps.bicep_deploy.outputs.staticWebAppName }} - 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 }} swaLocation=${{ secrets.AZURE_SWA_REGION }} identifier=${{ vars.AZURE_RESOURCE_IDENTIFIER }} - resourceGroupName: ${{ env.AZURE_RG_NAME }} - deploy_backend: +jobs : + build_backend: runs-on: ubuntu-latest - needs: deploy_infrastructure environment: production steps: @@ -67,22 +150,12 @@ jobs: 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 + build_frontend: + runs-on: ubuntu-latest + environment: production - deploy_frontend: + steps: runs-on: ubuntu-latest - needs: deploy_infrastructure environment: production steps: @@ -91,25 +164,4 @@ jobs: - 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: 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 - skip_api_build: true \ No newline at end of file + working-directory: ./frontend \ No newline at end of file From fe9a81c917829318e6206ebdd947b712cf1ce654 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 21 Jan 2026 14:18:51 +0100 Subject: [PATCH 25/25] correction build --- .github/workflows/deploy-infra-and-apps.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/deploy-infra-and-apps.yml b/.github/workflows/deploy-infra-and-apps.yml index 87cddb0a..f8fc96e1 100644 --- a/.github/workflows/deploy-infra-and-apps.yml +++ b/.github/workflows/deploy-infra-and-apps.yml @@ -153,11 +153,7 @@ jobs : build_frontend: runs-on: ubuntu-latest environment: production - - steps: - runs-on: ubuntu-latest - environment: production - + steps: - name: Checkout repository uses: actions/checkout@v4