Vercel 能够依托 Git
仓库 ,在线自动构建和发布Web
静态项目,支持自定义域名,能够自动签发SSL
证书,开启HTTPS
,还有一个特色,拥有全球CDN
,国内速度不错。git
支持多套框架和模版,如:Hugo、Jekyll、Hexo、Next、Vue…github
经过Git
仓库帐号关联注册,若是注册中出现错误,检查下帐号是否是QQ
邮箱。 bash
Vercel
不支持QQ
邮箱,以GitHub
为例,能够修改GitHub
的默认邮箱。框架
GitHub -> Settings -> Emails -> Primary email address
输入你的项目地址 post
选择你的帐户网站
在线安装Vercel
ui
受权Vercel
,选择受权项目spa
GitHub -> Settings -> Applications -> Vercel -> Configure
导入项目,选择项目框架code
导入项后会自动构建、发布项目,直接访问: https://ichochy.com/ ci
下次提交代码到Git
仓库,Vercel
不用任何操做,就能够直接自动构建和发布项目
直接添加已有的域名,域名商管理系统
配置域名记录,等待生效。
Vercel -> Project-> Settings -> Domains
生效后会自动签发SSL
证书,开启HTTPS
在项目的环境变量中添加Hugo
版本
Vercel -> Project-> Settings -> Environment Variables
HUGO_VERSION 0.74.2
完成后从新发布
Build Logs 12:21:18.550 Cloning github.com/iChochy/iChochy.github.io (Branch: master, Commit: a169de0) 12:21:19.212 Cloning completed in 662ms 12:21:19.213 Analyzing source code... 12:21:19.799 Installing build runtime... 12:21:20.194 Build runtime installed: 394.753ms 12:21:20.575 Looking up build cache... 12:21:20.638 Build cache found. Downloading... 12:21:20.647 Build cache downloaded [206.00 B]: 8.14ms 12:21:21.022 Installing Hugo version 0.74.2 12:21:23.078 Installing dependencies... 12:21:23.290 yarn install v1.22.4 12:21:23.302 info No lockfile found. 12:21:23.306 [1/4] Resolving packages... 12:21:23.306 [2/4] Fetching packages... 12:21:23.309 [3/4] Linking dependencies... 12:21:23.312 [4/4] Building fresh packages... 12:21:23.315 success Saved lockfile. 12:21:23.316 Done in 0.03s. 12:21:23.515 Building sites … 12:21:23.515 | EN 12:21:23.515 -------------------+------ 12:21:23.515 Pages | 109 12:21:23.515 Paginator pages | 4 12:21:23.515 Non-page files | 0 12:21:23.515 Static files | 13 12:21:23.515 Processed images | 0 12:21:23.515 Aliases | 1 12:21:23.515 Sitemaps | 1 12:21:23.515 Cleaned | 0 12:21:23.515 Total in 162 ms 12:21:23.776 Uploading build outputs... 12:21:31.360 Build completed. Populating build cache... 12:21:31.457 Uploading build cache [220.00 B]... 12:21:31.614 Build cache uploaded: 156.776ms 12:21:31.620 Done with "config.toml"