vercel login Vercel CLI 24.2.4 > Log in to Vercel (Use arrow keys) > Continue with GitHub Continue with GitLab Continue with Bitbucket Continue with Email Continue with SAML Single Sign-On ───────────────────────────────── Abort
按上下键可以选择登录方式,我就直接用Github登录了,会返回一个登录地址,可以直接在浏览器打开
登录完成后会像我下面这个这么提示
1 2 3 4 5 6
vercel login Vercel CLI 24.2.4 > Log in to Vercel github > Success! GitHub authentication complete for <your email> Congratulations! You are now logged in. In order to deploy something, run `vercel`. 💡 Connect your Git Repositories to deploy every branch push automatically (https://vercel.link/git).
接着我们对刚刚的json文件进行部署,使用下面的命令即可
1
vercel -A <name>.json --prod
这里的json的文件名要指定为你刚刚设置的文件,--prod是推入生产环境,按照提示输入就行了
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
vercel -A <name>.json --prod Vercel CLI 24.2.4 ❗️ Your Project was either deleted, transferred to a new Team, or you don’t have access to it anymore. ? Set up and deploy “<your folder>”? [Y/n] y ? Which scope do you want to deploy to? <your username or team> ? Link to existing project? [y/N] n ? What’s your project’s name? vercel-json ? In which directory is your code located? ./ No framework detected. Default Project Settings: - Build Command: `npm run vercel-build` or `npm run build` - Output Directory: `public` if it exists, or `.` - Development Command: None ? Want to override the settings? [y/N] n 🔗 Linked to <user/project> (created .vercel) 🔍 Inspect: <Your inspect link> [961ms] ✅ Production: <Your production link> [copied to clipboard] [10s]