https://github.com/kpverse/deploy-nextjs
Next JS Deployment Utility from KPVERSE
https://github.com/kpverse/deploy-nextjs
automation deployment kpverse next-deploy nextjs npm npm-package typescript
Last synced: 25 days ago
JSON representation
Next JS Deployment Utility from KPVERSE
- Host: GitHub
- URL: https://github.com/kpverse/deploy-nextjs
- Owner: kpverse
- License: mit
- Created: 2023-08-27T07:13:34.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-14T08:57:41.000Z (about 2 years ago)
- Last Synced: 2025-08-28T00:05:07.424Z (7 months ago)
- Topics: automation, deployment, kpverse, next-deploy, nextjs, npm, npm-package, typescript
- Language: TypeScript
- Homepage: https://kpverse.in/deploy-nextjs
- Size: 455 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://kpverse.in/deploy-nextjs/ "Next JS Deployment Automation Tool from KPVERSE")
@kpverse/deploy-nextjs
An invaluable tool that simplifies the deployment process of static sites generated by Next JS
## What is this for?
[@kpverse/deploy-nextjs](https://kpverse.in/deploy-nextjs) is an npm package to simplify the process of deploying Next JS project on GitHub Pages.
## How can this benefit developers?
1. No need to make Next JS project repository public. Only the deployment repository will b public.
1. No need to create an account on Vercel or Netlify to host Next JS.
1. You can use free and open-source CDNs for content delivery. (For more information read [recommended Next JS configuration](#recommended-next-js-configuration).)
## Is this suitable for beginners?
Yes, it is beginner-friendly and streamlines the deployment process for developers of all skill levels.
## Prerequisites
To use [@kpverse/deploy-nextjs](https://kpverse.in/deploy-nextjs), your deployment repository must be hosted on GitHub, and GitHub Pages must be enabled.
## Installation
You can install this package using pnpm or npm or yarn:
```sh
npm i @kpverse/deploy-nextjs -D
# or
pnpm i @kpverse/deploy-nextjs -D
# or
yarn add @kpverse/deploy-nextjs --dev
```
## Quick Start Guide
After installation, simply run the following command to get started:
```bash
npx deploy-nextjs
```
## Configuration Options for [@kpverse/deploy-nextjs](https://kpverse.in/deploy-nextjs)
The package generates a `deploy-nextjs.config.js` file upon first use, allowing you to customize your deployment configurations.
## Recommended Next JS Configuration
```js
// Recommended Next JS Configuration (next.config.js)
let GITHUB_USERNAME = "",
DEPLOYMENT_REPOSITORY_NAME = "",
BASE_PATH = "";
/** @type {import('next').NextConfig} */
const nextConfig = {
// Read official docs from Next JS: https://nextjs.org/docs/app/api-reference/next-config-js/basePath
// NOTE: It is optional.
basePath: `/${BASE_PATH}`,
// Read official docs from Next JS: https://nextjs.org/docs/app/api-reference/next-config-js/assetPrefix
// NOTE: It is optional.
assetPrefix: `https://cdn.jsdelivr.net/gh/${GITHUB_USERNAME}/${DEPLOYMENT_REPOSITORY_NAME}@latest/${BASE_PATH}`,
// Read official docs from Next JS: https://nextjs.org/docs/app/api-reference/next-config-js/output
output: "export",
// Read official docs from Next JS: https://nextjs.org/docs/app/api-reference/next-config-js/trailingSlash
trailingSlash: true,
};
module.exports = nextConfig;
```
## Support and Issue Reporting
If you need assistance or want to report any issues, please visit [issues tab](https://github.com/kpverse/deploy-nextjs/issues) of our GitHub repository.
## Contributing
This package is open-source, and we welcome contributions from the community. You can contribute to it on [GitHub](https://github.com/kpverse/deploy-nextjs).
## Commercial Use
[@kpverse/deploy-nextjs](https://kpverse.in/deploy-nextjs) is licensed under [the MIT License](./LICENSE). Refer to the [license](./LICENSE) for usage and permissions.
## Additional Resources
Read [Medium blog](https://medium.com/@kpverse/783b31924fc6) about this package.
Also check out [YouTube video](https://youtu.be/_PQtajOaq_Y) explaining this package.
[](https://youtu.be/_PQtajOaq_Y)