Hacker News new | ask | show | jobs
by scott_hardy 3729 days ago
I especially like that they have added configuration options to the .gitlab-ci.yml. If I am not mistaken, this means your project can auto-deploy using an arbitrary build process. Here's what an example .gitlab-ci.yml looks like with a GitLab Pages build configuration: https://gitlab.com/pages/pages.gitlab.io/blob/master/.gitlab...

A couple friends and I made something similar for GitHub Pages using Travis CI as our static deployment build-and-deploy host. For example, here's what our .travis.yml looks like: https://github.com/L33T-KR3W/soundcasts-web/blob/master/.tra... and here is the actual deploy command that is being run to `git push` to GitHub Pages: https://github.com/L33T-KR3W/soundcasts-web/blob/master/pack...

The GitLab approach is cleaner and requires less tooling. Nice work!

2 comments

Thanks!

You can indeed have a fully automated deployment. You could already do this with GitLab CI on an external server (S3 or anything else), but now you don't have to worry about hosting anymore.

We took inspiration from .travis.yml when designing the .gitlab-ci.yml file, but are continuing to add features and configurations that make it possible to work together with other GitLab features such as build artifacts and now Pages.

One of the big limitations of Jekyll + Github pages is you cannot use plugins..any plugins at all. If Gitlab's build process allowed for Jekyll plugins and custom domains, I may consider moving my pages there as well.
You can totally use Jekyll plugins since you can define any command in .gitlab-ci.yml. It's like running Jekyll locally.

And custom domain are supported as well. See the bottom of https://pages.gitlab.io

In fact, you don't even need to use Jekyll. You can use literally anything you want.
ICYI, you can run Jekyll + plugins on Bitbucket / Aerobatic:

https://www.aerobatic.com/blog/automated-continuous-deployme...

You can also provision a free wildcard SSL cert.

Disclaimer: co-founder of Aerobatic.

jekyll plugins are disabled for a good reason, otherwise you could basically execute anything you want on their server.
With the GitLab runner, you actually can execute anything you want on their server. It's sandboxed like any other CI service.