feat: add GitHub Actions workflow for deploying to GitHub Pages and u… - #41
Conversation
…pdate npm scripts for Vite
WalkthroughThe project now provides Vite development, build, and preview commands. A GitHub Actions workflow builds the project with Node.js 22 and deploys the ChangesGitHub Pages deployment
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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/CD.yml:
- Line 25: Pin every listed GitHub Action in .github/workflows/CD.yml to its
approved full commit SHA instead of mutable version tags: lines 25
(actions/checkout), 28 (actions/setup-node), 34 (actions/configure-pages), 43
(actions/upload-pages-artifact), and 58 (actions/deploy-pages). Update each uses
reference while preserving the existing action versions and workflow behavior.
- Line 40: Update the Vite configuration’s defineConfig base setting to
/SupportUsButton/ for the GitHub Pages project deployment, ensuring generated
asset URLs resolve under the repository path while preserving root-base behavior
only for user or organization sites and custom domains.
- Around line 10-13: Update the workflow-level permissions to retain only
contents: read, and define pages: write and id-token: write under
jobs.deploy.permissions. In the build job’s checkout step, set
persist-credentials to false so deployment credentials are not retained during
npm ci or vite:build.
🪄 Autofix
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 Plus
Run ID: 612d91da-4878-412f-9de6-2c16e0eb4477
📒 Files selected for processing (2)
.github/workflows/CD.ymlpackage.json
Additional Notes:
This PR adds CD action to have the hosted preview of the Development Environment.
Checklist
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
New Features
Improvements