-
Notifications
You must be signed in to change notification settings - Fork 135
Add GitHub Pages workflow for UX deployment #1404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: features/ux
Are you sure you want to change the base?
Conversation
…not found and loaded when built
…to support deployment to GitHub Pages. This ensures assets are correctly referenced when hosted at the repository subdirectory path. Local development still uses root path ('/') for convenience.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a GitHub Pages deployment workflow for the UX application and adjusts configuration settings for correct deployment routing.
- Introduces a new GitHub Actions workflow file for GitHub Pages deployment
- Updates Vite and Router configurations to support the GitHub Pages base path
- Fixes an issue with the relative path for the background image in production
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/web/vite.config.ts | Sets the base path conditionally for production builds |
.github/workflows/ux-pages.yml | Defines a workflow to build and deploy the UX application to GitHub Pages |
src/web/pages/App.tsx | Adjusts Router basename configuration for GitHub Pages compatibility |
src/web/components/tests/SideBar.test.tsx | Adds testing-library/jest-dom import for improved assertions |
Comments suppressed due to low confidence (1)
src/web/pages/App.tsx:21
- There is an inconsistency between the base path in vite.config.ts ('/finops-toolkit/') and the Router basename in App.tsx ('/finops-toolkit'). To ensure consistent routing, consider aligning them (e.g., include the trailing slash in both).
<Router basename={window.location.hostname === 'localhost' ? '/' : '/finops-toolkit'}>
push: | ||
branches: ["features/ux"] | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need anything or is it intentionally blank? If so, maybe leave a comment so people know it's intentional.
.github/workflows/ux-pages.yml
Outdated
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["features/ux"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this goes live, we only want to run it on main
. It's fine to keep it on this branch for now, however.
@@ -0,0 +1 @@ | |||
{"root":["./pages/App.tsx","./pages/AzureOptimizationEnginePage.tsx","./pages/BicepRegistryModulesPage.tsx","./pages/CostOptimizationWorkbookPage.tsx","./pages/FinOpsHubsPage.tsx","./pages/FinOpsWorkbooksPage.tsx","./pages/GovernanceWorkbookPage.tsx","./pages/HomePage.tsx","./pages/OpenDataPage.tsx","./pages/PowerBIReportsPage.tsx","./pages/PowerShellModulePage.tsx","./pages/ToolsLandingPage.tsx","./pages/main.tsx","./pages/__tests__/App.test.tsx","./pages/__tests__/HomePage.test.tsx","./components/__tests__/SideBar.test.tsx"],"version":"5.7.2"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to list out every page manually? This seems like it'll break at some point when we forget to add one 😕
Not sure if this is from this PR or another.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were doing some tests with build and vite preview, I think the TS compiler generated the file for incremental builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the compiler always generate it? Should it be in .gitignore?
@@ -0,0 +1 @@ | |||
{"root":["./pages/App.tsx","./pages/AzureOptimizationEnginePage.tsx","./pages/BicepRegistryModulesPage.tsx","./pages/CostOptimizationWorkbookPage.tsx","./pages/FinOpsHubsPage.tsx","./pages/FinOpsWorkbooksPage.tsx","./pages/GovernanceWorkbookPage.tsx","./pages/HomePage.tsx","./pages/OpenDataPage.tsx","./pages/PowerBIReportsPage.tsx","./pages/PowerShellModulePage.tsx","./pages/ToolsLandingPage.tsx","./pages/main.tsx","./pages/__tests__/App.test.tsx","./pages/__tests__/HomePage.test.tsx","./components/__tests__/SideBar.test.tsx"],"version":"5.7.2"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the compiler always generate it? Should it be in .gitignore?
@Ivanmtta can you please review? |
🛠️ Description
Added a new GitHub Actions workflow to automatically deploy the UX application to GitHub Pages. This workflow builds and deploys the web application whenever changes are pushed to the
pages-action-ux
branch or when manually triggered.Changes
Implementation Details
Usage
Prequisite to run the workflow:
The workflow can be triggered by:
features/ux
branchThe deployed site will be available at the URL provided in the workflow run output.
📷 Screenshots
📋 Checklist
🔬 How did you test this change?
📑 Did you update
docs/changelog.md
?📖 Did you update documentation?