教學
Nextjs

部署 Next.js 專案

這篇文章將會教你如何在 Zeabur 上部署你的 Next.js (opens in a new tab) 專案。

第一步:初始化 Next.js 應用程式(可選)

打開終端機,輸入以下指令:

npx create-next-app@latest
# or
yarn create next-app
# or
pnpm create next-app

如果你在這個步驟遇到了問題,請參考 Next.js 官方文件 (opens in a new tab)

建立完成後,為其初始化一個 Git 儲存庫並推送到你的 GitHub 上。

第二步:部署 Next.js 專案

在你的專案中,點選 Deploy service 或者 Add new service 按鈕,並選擇 Deploy your source code.

deploy

搜尋想要部署的 Next.js 專案儲存庫,然後點選 import,你的 Next.js 應用程式就將自動開始部署。