前几天看到 这些年,我们知道的那些 pages 平台 这篇文章中提到 GitLab Pages 原生支持 hexo.(还有 Hugo 、 Middleman 、 Brunch 、 Metalsmith 、 Harp 等)
其中 GitLab Documentation 写着
Find out the general domain name that is used for GitLab Pages (ask your administrator). This is very important, so you should first make sure you get that right.
Create a project
Push a .gitlab-ci.yml file in the root directory of your repository with a specific job named pages
Set up a GitLab Runner to build your website
想尝尝鲜,但是还是不知道怎么去部署。是像原来 GitHub 那样用 hexo deploy 上去(显示404 page not found
)还是把博客文件 commit 到 GitLab 中让他跑 Runner 构建?求指点~
完整案例