首先 fork此项目https://github.com/SR0725/github-issue-blog,我fork后的项目地址是
https://github.com/briteming/sgib,然后访问https://github.com/briteming/sgib/settings,勾选issues. 然后访问https://github.com/briteming/sgib/issues/new ,新建一些issues.
然后,
為了讓您的應用能夠通過 GitHub OAuth驗證,請按照以下步驟操作:
- 訪問 GitHub Developer Settings
- 點擊「New OAuth App」按鈕。
- 在「Name」欄位中隨意填寫應用名稱。我填写的是sgib.
- 「Homepage URL」填寫為 http://localhost:3000/ 。
- (可選)填寫應用描述。
- 「Authorization callback URL」填寫為 http://localhost:3000/api/auth/callback/github
- 確保「Enable Device Flow」保持未勾選狀態。
- 點擊「Register application」按鈕, 完成註冊。
- 註冊後,您將獲得一個 Client ID。
- 生成一個 Client Secret,點擊「Generate a new client secret」按鈕,輸入您的 GitHub 密碼以確認。(把Client ID的值和Client Secret的值记录下来,比如保存到一个txt文件中)
然后,访问vercel.com/new ,导入项目https://github.com/briteming/sgib到vercel.com/new。 在来到如下页面时,点击environment variables:
按https://github.com/briteming/sgib/blob/master/.env.example的内容,添加全部的环境变量。其中,NEXTAUTH_SECRET的值,填写一个随机的字符串。然后点击 deploy按钮,等待部署完成,部署完成后,我得到的网址是https://sgib.vercel.app/
演示网站:https://sgib.vercel.app/
项目地址:https://github.com/SR0725/github-issue-blog
https://github.com/briteming/sgib
No comments:
Post a Comment