Skip to content

fix: update deployment workflow and refine Vite configuration#66

Merged
Zahnentferner merged 2 commits into
AOSSIE-Org:mainfrom
rahul-vyas-dev:feat/ci
Jun 5, 2026
Merged

fix: update deployment workflow and refine Vite configuration#66
Zahnentferner merged 2 commits into
AOSSIE-Org:mainfrom
rahul-vyas-dev:feat/ci

Conversation

@rahul-vyas-dev

@rahul-vyas-dev rahul-vyas-dev commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Additional Notes:

This PR updates the deployment workflow according to vite-react app.

Checklist

  • My code follows the project's code style and conventions
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contributing Guidelines

⚠️ AI Notice - Important!

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.

Summary by CodeRabbit

  • Chores
    • Streamlined deployment workflow and build process for faster, more reliable deployments.
    • Updated build configuration to better distinguish production vs. development settings.
  • Bug Fixes
    • Corrected production base path and router basename so the app routes and static assets load properly when hosted under /OrgExplorer.

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4187f260-cbd6-41a2-8a4e-943295b3d6ef

📥 Commits

Reviewing files that changed from the base of the PR and between b3aac82 and 9e4609f.

📒 Files selected for processing (2)
  • .github/workflows/deploy.yml
  • src/main.jsx

Walkthrough

Vite config now sets a production base path "/OrgExplorer/" and the app router uses the same basename; GitHub Actions workflow simplified to Node.js 22 with npm ci/npm run build, uploads ./dist, and scopes permissions per-job.

Changes

Build and Deployment Configuration

Layer / File(s) Summary
Vite build configuration and app router basename
vite.config.js, src/main.jsx
Vite config exports a mode-aware callback that sets base to "/OrgExplorer/" for production; BrowserRouter now sets basename to /OrgExplorer when import.meta.env.PROD is truthy.
GitHub Pages deployment workflow
.github/workflows/deploy.yml
Workflow name/triggers/concurrency updated; build job simplified to Node.js 22 with npm ci and npm run build; artifacts uploaded from ./dist; permissions moved to job-level (contents: read for build, pages: write and id-token: write for deploy).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

Typescript Lang

Suggested reviewers

  • Zahnentferner

Poem

🐰 A rabbit nibbles code beneath the moonlit mist,
Base paths twine and routers get a twist,
Node and npm hum, building wonders in the night,
./dist glows softly under Pages' light,
Hooray — deployments hop along just right!

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: updating the deployment workflow for Vite and refining the Vite configuration itself.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added no-issue-linked PR has no linked issue ci-cd CI/CD changes configuration Config file changes github-actions GitHub Actions changes javascript JavaScript/TypeScript changes size/M 51-200 lines changed external-contributor External contributor and removed size/M 51-200 lines changed labels Jun 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/deploy.yml:
- Around line 12-15: The workflow-wide permissions block currently grants pages:
write and id-token: write which elevates privileges for all jobs (including
build); remove or reduce these permissions from the top-level permissions block
to the minimal defaults (e.g., only contents: read) and add a job-scoped
permissions entry to the deploy job that explicitly sets pages: write and
id-token: write (referencing the top-level permissions key and the deploy job
name) so only the deploy job has those write permissions; also apply the same
change where the duplicate permissions appear (the block referenced around lines
49-61).
- Line 27: The workflow uses tag-pinned GitHub Actions (e.g., uses:
actions/checkout@v4, actions/setup-node@v4, actions/configure-pages@v5,
actions/upload-pages-artifact@v3, actions/deploy-pages@v5); update each of those
uses: entries to the corresponding full commit SHAs instead of mutable tags.
Locate the five occurrences of actions/checkout, actions/setup-node,
actions/configure-pages, actions/upload-pages-artifact, and actions/deploy-pages
in .github/workflows/deploy.yml and replace the `@vX` tag with the verified commit
SHA from each action's repository (ensure you copy the exact full 40-character
SHA and run a quick workflow lint or dry-run to confirm validity).

In `@vite.config.js`:
- Line 7: Vite's base is set to "/OrgExplorer/" but the React Router
BrowserRouter is mounted without a basename, causing broken refresh/deep links;
update the BrowserRouter instantiation (look for BrowserRouter in src/main.jsx,
the root mount code) to pass basename="/OrgExplorer" (or derive it from
process.env or import.meta.env.BASE_URL) so the router's basename matches the
Vite base setting.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a696f411-e413-44ec-b5fa-7779ebaf83dd

📥 Commits

Reviewing files that changed from the base of the PR and between 5cf488d and b3aac82.

📒 Files selected for processing (2)
  • .github/workflows/deploy.yml
  • vite.config.js

Comment thread .github/workflows/deploy.yml Outdated
Comment thread .github/workflows/deploy.yml
Comment thread vite.config.js
@github-actions github-actions Bot added frontend Frontend changes size/M 51-200 lines changed and removed size/M 51-200 lines changed labels Jun 4, 2026
@Zahnentferner Zahnentferner merged commit c0ced11 into AOSSIE-Org:main Jun 5, 2026
4 of 6 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jun 5, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd CI/CD changes configuration Config file changes external-contributor External contributor frontend Frontend changes github-actions GitHub Actions changes javascript JavaScript/TypeScript changes no-issue-linked PR has no linked issue size/M 51-200 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants