-
在 GitHub 建立一個新的 Repository
-
部署前請務必先將原始碼上傳到 GitHub Repository 也就是初始化 GitHub,因此通常第一步驟會在專案終端機輸入以下指令
git init # 若已經初始化過就可以不用輸入
git add .
git commit -m 'first commit'
git branch -M main
git remote add origin [GitHub Repositories Url]
git push -u origin main // 僅限第一次輸入,往後只需要輸入 git push
- 初始化完畢後,執行
npm run deploy
指令進行自動化部署