Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b8b202a
step1
Oumaima741 Jan 14, 2026
daea2e3
commit step1
Oumaima741 Jan 20, 2026
c8157fd
commit step1 meth2
Oumaima741 Jan 20, 2026
04ded05
commit step1
Oumaima741 Jan 20, 2026
836aec4
rydy
Oumaima741 Jan 20, 2026
0d99c81
step1
Oumaima741 Jan 20, 2026
bd79399
step
Oumaima741 Jan 20, 2026
c34926d
step
Oumaima741 Jan 20, 2026
ca19f72
fix
Oumaima741 Jan 20, 2026
960655e
test
Oumaima741 Jan 20, 2026
762412c
backend
Oumaima741 Jan 20, 2026
5704848
backend
Oumaima741 Jan 20, 2026
18b14a5
backendfinaly
Oumaima741 Jan 20, 2026
794abbc
frontend1
Oumaima741 Jan 20, 2026
f2c8549
frontend
Oumaima741 Jan 20, 2026
30ef926
frontend2
Oumaima741 Jan 20, 2026
5eb0fae
doterror
Oumaima741 Jan 20, 2026
d0fe724
front
Oumaima741 Jan 20, 2026
b5177d3
erreurtest
Oumaima741 Jan 20, 2026
c70d3f4
pushfinalfrontend
Oumaima741 Jan 20, 2026
7f61636
commitfront
Oumaima741 Jan 20, 2026
0b56186
testfinal
Oumaima741 Jan 20, 2026
9d15c1e
tag
Oumaima741 Jan 20, 2026
6775131
tag1
Oumaima741 Jan 21, 2026
64acca6
tagfinal
Oumaima741 Jan 21, 2026
6519fc1
qst2
Oumaima741 Jan 21, 2026
d82ac1e
modiftestcI
Oumaima741 Jan 21, 2026
f11269a
committestc2
Oumaima741 Jan 21, 2026
3c1d042
Merge pull request #1 from Oumaima741/feat2
Oumaima741 Jan 21, 2026
8256890
COMMITDOC
Oumaima741 Jan 21, 2026
60a6d1c
Merge branch 'main' of https://github.com/Oumaima741/parkndeploy
Oumaima741 Jan 21, 2026
1285a93
COMMITEXO2
Oumaima741 Jan 21, 2026
dbefcd4
Merge branch 'main' into feat2
Oumaima741 Jan 21, 2026
29b2a3a
COMMITQST
Oumaima741 Jan 21, 2026
8915af3
Merge branch 'feat2' of https://github.com/Oumaima741/parkndeploy int…
Oumaima741 Jan 21, 2026
abd4ae0
commitworkflow
Oumaima741 Jan 21, 2026
c7a86ca
commitci
Oumaima741 Jan 21, 2026
9c48055
Merge pull request #2 from Oumaima741/feat2
Oumaima741 Jan 21, 2026
17eb550
commitcicd
Oumaima741 Jan 21, 2026
79d71f6
changement manuel
Oumaima741 Jan 21, 2026
15d45bf
alanceravectag
Oumaima741 Jan 21, 2026
b854ace
changement manuel
Oumaima741 Jan 21, 2026
87c7369
committag
Oumaima741 Jan 21, 2026
daae81b
manuel
Oumaima741 Jan 21, 2026
8fd424f
done
Oumaima741 Jan 21, 2026
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
52 changes: 52 additions & 0 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI on Pull Request

on:
pull_request:
branches:
- main
types: [opened, synchronize, reopened]

jobs:
frontend:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm ci
working-directory: ./frontend

- name: Build React app
run: npm run build
working-directory: ./frontend

- name: Run lint
run: npm run lint
working-directory: ./frontend

backend:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

- name: Restore dependencies
run: dotnet restore
working-directory: ./backend

- name: Build backend in Release
run: dotnet build -c Release --no-restore
working-directory: ./backend
164 changes: 164 additions & 0 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
name: CI/CD Release

on:
push:
branches:
- main

env:
AZURE_RG_NAME: rg-${{ vars.PROJECT_NAME }}-${{ vars.AZURE_RESOURCE_IDENTIFIER }}

permissions:
id-token: write

jobs:

frontend:
name: Build Frontend
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm ci
working-directory: ./frontend

- name: Build React app
run: npm run build
working-directory: ./frontend

- name: Upload frontend artifact
uses: actions/upload-artifact@v4
with:
name: frontend-build
path: ./frontend/dist

backend:
name: Build Backend
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

- name: Restore dependencies
run: dotnet restore
working-directory: ./backend/ParkNDeploy.Api

- name: Publish .NET app
run: dotnet publish -c Release -o ./publish
working-directory: ./backend/ParkNDeploy.Api

- name: Upload backend artifact
uses: actions/upload-artifact@v4
with:
name: backend-publish
path: ./backend/ParkNDeploy.Api/publish


deploy_infrastructure:
runs-on: ubuntu-latest
needs: [frontend, backend]
environment: production
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: Download backend artifact
uses: actions/download-artifact@v4
with:
name: backend-publish
path: ./backend_publish

- 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 }}
package: ./backend_publish


deploy_frontend:
runs-on: ubuntu-latest
needs: deploy_infrastructure
environment: production
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download frontend artifact
uses: actions/download-artifact@v4
with:
name: frontend-build
path: ./frontend_dist

- 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
116 changes: 116 additions & 0 deletions .github/workflows/deploy-infra-and-apps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:


env:
AZURE_RG_NAME: rg-${{ vars.PROJECT_NAME }}-${{ vars.AZURE_RESOURCE_IDENTIFIER }}

permissions:
id-token: write

jobs:
deploy_infrastructure:
runs-on: ubuntu-latest
environment: production
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 --propertyublishDir=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_infrastructure ...

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


1 change: 1 addition & 0 deletions backend/ParkNDeploy.Api/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"

}
}
}
2 changes: 1 addition & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ParkNDeploy</title>
</head>
</head>\\coucou modifSDQSDCS
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
Expand Down
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "frontend",
"private": true,
"version": "0.0.0",
"version": "1.2.3",
"type": "module",
"scripts": {
"dev": "vite --port 5175",
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ function App() {
<h1 className="text-2xl font-bold text-center">
Where can I Park in Angers ? 👀
</h1>
<h1>ParkNDeploy</h1>
<p>Version: {APP_VERSION}</p>
<ParkingListFilters
onChange={(parkingName: string) => {
console.log(parkingName);
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/// <reference types="vite/client" />

declare const APP_VERSION: string;
Loading