# This references a standard debian container from the# Docker Hub https://registry.hub.docker.com/_/debian/# Read more about containers on our dev center# http://devcenter.wercker.com/docs/containers/index.htmlbox:debian# You can also use services such as databases. Read more on our dev center:# http://devcenter.wercker.com/docs/services/index.html# services:# - postgres# http://devcenter.wercker.com/docs/services/postgresql.html# - mongo# http://devcenter.wercker.com/docs/services/mongodb.html# This is the build pipeline. Pipelines are the core of wercker# Read more about pipelines on our dev center# http://devcenter.wercker.com/docs/pipelines/index.htmlbuild:# Steps make up the actions in your pipeline# Read more about steps on our dev center:# http://devcenter.wercker.com/docs/steps/index.htmlsteps:- script:name:install gitcode:| apt-get update
apt-get install git -y- script:# 如果使用submodules, 记得添加配置文件.gitmodulesname:initialize and update git submodulescode:| git submodule init
git submodule update --remote --recursive- arjen/hugo-build:theme:LoveItflags:--buildDrafts=true- npm-install- script:name:publish algolia jsoncode:| npm run algoliadeploy:steps:- install-packages:packages:git ssh-client# 官方给的lukevivier/gh-pages@0.2.1会部署到gh-pages分支,17年我用的时候没这毛病,这里改用别的Step# 部署public目录下的静态文件至username.github.io的master分支- sf-zhou/gh-pages@0.2.6:token:$GIT_TOKENdomain:http://blog.orionpax.toprepo:OrionPax19970905/OrionPax19970905.github.iobranch:masterbasedir:public
5 同款 Blog 搭建保姆级全流程
(可选,已有 GitHub 账号的跳过这一步) 注册并登录 GitHub
点击 clone 通过 Vercel 模版 构建项目,输入项目名称创建项目,填写环境变量并点击 Deploy,耐心等待一段时间,Congratulations! 点击 Go to Dashboard - Visit 你已经看到你的博客网站了。使用 Vercel 创建的项目是已经配置了 CI 的,当你向 GitHub 的仓库提交代码时,Vercel 会自动重新打包并发布项目,因此你做的所有提交都会使网站重新构建。