# install dependencies
pnpm install
Then edit info in vite.config.ts
.
const config = {
// ...
LINKS: {
domain: `https://pr.ryoppippi.com`, // The hostname of your site
repo: 'https://github.com/ryoppippi/pr.ryoppippi.com', // GitHub repository name ( will be the link of octocat icon 🐱 )
username: 'ryoppippi', // GitHub username
includeYourOwnPRs: 'true', // Include your own PRs 'true' or 'false'
},
// ...
};
export default config;
pnpm dev
(Optional): To prevent rate limiting, you can pass your GitHub token as an environment variable:
GITHUB_TOKEN=(gh auth token) pnpm dev
# build for production
pnpm build
pnpm preview
This repository supports two deployment destinations: Cloudflare Pages and GitHub Pages.
Run the following command:
pnpm run deploy
When deploying to Cloudflare Pages from GitHub Actions, follow the steps below:
set the following secrets to your repository:
CLOUDFLARE_ACCOUNT_ID
: Cloudflare account IDCLOUDFLARE_API_TOKEN
: Cloudflare API tokenedit info in vite.config.ts
:
LINKS.domain
should be your Cloudflare Pages domain ( ex. https://pr.ryoppippi.com
)LINKS.repo
should be your forked repository ( ex. https://github.com/ryoppippi/pr.ryoppippi.com
)LINKS.username
should be your GitHub username ( ex. ryoppippi
)set CF
to env.UPLOAD_TO
in workflows/deploy.yaml.
run the workflow manually or push to the repository.
enjoy!
You can upload the build
to GitHub Pages via GitHub Actions.
set GH
to env.UPLOAD_TO
in workflows/deploy.yaml.
edit info in vite.config.ts
:
LINKS.domain
should be https://<username>.github.io/<repository>
LINKS.repo
should be your forked repository ( ex. https://github.com/ryoppippi/pr.ryoppippi.com
)LINKS.username
should be your GitHub username ( ex. ryoppippi
)run the workflow manually or push to the repository.
enjoy!