Skip to content
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
20 changes: 10 additions & 10 deletions .github/workflows/ci-cd-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
- name: 'Create and push the artifact'
uses: actions/upload-artifact@v4
with:
name: frontend-build
path: ./frontend
name: frontend-artifact
path: ./frontend/dist

build_dotnet_app_release_backend_job:
runs-on: ubuntu-latest
Expand All @@ -56,8 +56,8 @@ jobs:
- name: 'Create and push the artifact'
uses: actions/upload-artifact@v4
with:
name: backend-build
path: ./backend
name: backend-artifact
path: ./backend/ParkNDeploy.Api/publish

deploy_infrastructure:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -109,8 +109,8 @@ jobs:
- name: Download a single artifact
uses: actions/download-artifact@v5
with:
name: frontend-build
path: ./frontend
name: frontend-artifact
path: ./frontend/dist

- name: Login to Azure
uses: azure/login@v2
Expand All @@ -129,7 +129,7 @@ jobs:
uses: azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ env.SWA_DEPLOYMENT_TOKEN }}
app_location: ./frontend
app_location: frontend/dist
action: upload
skip_app_build: true
skip_api_build: true
Expand All @@ -146,8 +146,8 @@ jobs:
- name: Download a single artifact
uses: actions/download-artifact@v5
with:
name: backend-build
path: ./backend
name: backend-artifact
path: ./backend/ParkNDeploy.Api/publish

- name: Login to Azure
uses: azure/login@v2
Expand All @@ -160,4 +160,4 @@ 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
package: ./backend/ParkNDeploy.Api/publish # Path to the previously published app
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": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite --port 5175",
Expand Down
1 change: 1 addition & 0 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function App() {
{isPending && <LoadingSpinner className="mr-2 h-4 w-4 animate-spin" />}
{isError && <span>Something went wrong with the backend ...</span>}
{data && <ParkingList parkings={data.parkings} />}
<p>App Version: {APP_VERSION}</p>
</div>
);
}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/// <reference types="vite/client" />
declare const APP_VERSION: string;
3 changes: 3 additions & 0 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ export default defineConfig({
},
},
plugins: [react()],
define: {
APP_VERSION: JSON.stringify(process.env.npm_package_version),
},
})
Loading