chore: add deploy workflow#7
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a deployment pipeline, updates dependencies, and configures Vite to copy a static CNAME file for GitHub Pages support.
- Introduces a new GitHub Actions workflow to build and deploy to GitHub Pages.
- Configures
vite-plugin-static-copyinvite.config.tsto include theCNAMEfile in the output. - Adds type definitions and the static copy plugin to
package.json.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| vite.config.ts | Added vite-plugin-static-copy plugin to copy CNAME to dist. |
| package.json | Added @types/node and vite-plugin-static-copy dependencies. |
| .github/workflows/deploy.yml | New workflow for building and deploying to GitHub Pages. |
| .github/workflows/ci.yml | Updated CI branch filters from main to master. |
Comments suppressed due to low confidence (1)
.github/workflows/ci.yml:5
- CI branch filters were switched from 'main' to 'master'; verify this matches the repository’s default branch so CI runs as expected.
branches: ['master']
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 |
There was a problem hiding this comment.
Node.js version '22' is not a released LTS; consider using a valid version like '20' or a semantic range (e.g., '18.x') to ensure the setup-node action succeeds.
Suggested change
| node-version: 22 | |
| node-version: 20 |
Comment on lines
+15
to
+17
| env: | ||
| VITE_GITHUB_TOKEN: ${{ secrets.VITE_GITHUB_TOKEN }} | ||
|
|
There was a problem hiding this comment.
The VITE_GITHUB_TOKEN environment variable is set but never referenced; remove it or update the deploy step to use it if that was intended.
Suggested change
| env: | |
| VITE_GITHUB_TOKEN: ${{ secrets.VITE_GITHUB_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several updates to the CI/CD pipeline, dependencies, and Vite configuration. The changes primarily focus on adding a deployment workflow for GitHub Pages, updating dependencies, and configuring a static file copy plugin in Vite.
CI/CD Updates:
.github/workflows/deploy.yml) to build and deploy the project to GitHub Pages. This includes steps for setting up Node.js, installing dependencies, building the project, and deploying the./distdirectory usingpeaceiris/actions-gh-pages.Vite Configuration:
vite.config.tsto include thevite-plugin-static-copyplugin. This configuration copies theCNAMEfile to the root of the build output directory, ensuring custom domain support for GitHub Pages.