Commit 85793a7f authored by Peter Serwylo's avatar Peter Serwylo

Add CI task, to be run manually using gitlab-runner.

This adds a task which builds the site with the URL of
'', and also copies the output to a directory
specified by the environment variable $DEPLOY_DIR. The goal is to run
the following script:

 gitlab-runner exec docker \
   -docker-volumes `pwd`/_site:/builds/output \
   --env DEPLOY_DIR=/builds/output

to make the available to the Docker host machine after running.
parent 45b70af3
......@@ -9,6 +9,44 @@ variables:
# This is a manual task for building in preperation to deploy to The intention
# is for it to be run locally using `gitlab-runner` each time a signed tag is found. Invoke like so:
# gitlab-runner exec docker -docker-volumes `pwd`/_site:/builds/output --env DEPLOY_DIR=/builds/output
# And when it is finished, you should have a directory in `pwd`/_site/build which includes the entire
# static site ready to be deployed to
stage: deploy
when: manual
- vendor/ruby
- '[ ! -d "$DEPLOY_DIR" ] && echo "DEPLOY_DIR env variable must point to a directory" && exit 1'
- ruby -v
- apt-get update
- apt-get install -y locales
- echo "en_US UTF-8" > /etc/locale.gen
- locale-gen en_US.UTF-8
- export LANG=en_US.UTF-8
- export LANGUAGE=en_US:en
- export LC_ALL=en_US.UTF-8
- apt-get install -y zlib1g-dev
- gem install jekyll bundler
- bundle install --path vendor
- 'echo "url:" > userconfig.yml'
- 'echo "baseurl: \"\"" >> userconfig.yml'
- echo "Additional Jekyll config used for CI:" && cat userconfig.yml
- bundle exec jekyll build -d $OUT_DIR --config _config.yml,userconfig.yml --verbose --trace
stage: test
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment