Rewrite CI stuff in order to build main site

parent 7d69cfbf
Pipeline #58 failed
......@@ -5,20 +5,36 @@ variables:
LC_ALL: C.UTF-8
GIT_SUBMODULE_STRATEGY: recursive
pages:
stage: deploy
stages:
- build
- deploy
before_script:
- apt install rsync
- ./scripts/ci_fix_baseurl.sh
build:
stage: build
cache:
key: gems
paths:
- "/usr/local/bundle/cache"
script:
- bundle install
- ./scripts/ci_fix_baseurl.sh
- jekyll build -d public
production:
stage: deploy
script:
- ./scripts/ci_deploy_site.sh public
only:
- master
pages:
stage: deploy
artifacts:
paths:
- public
cache:
key: gems
paths:
- "vendor/bundle"
- "$HOME/.bundle"
only:
- master
- develop
#!/bin/bash
deploy_path="$1"
lftp << EOF
set sftp:connect-program "ssh -a -x -i $SSH_DEPLOY_KEY"
open -u $SSH_DEPLOY_USER, sftp://$SSH_DEPLOY_HOST
mirror -R --delete "$deploy_path/" /www.poul.org/
exit
EOF
......@@ -5,6 +5,11 @@ if [[ "$CI_JOB_ID" == "" ]]; then
exit
fi
if [[ "$CI_COMMIT_REF_NAME" == "master" ]]; then
echo "Building master branch, skipping"
exit 0
fi
# Remove everything before the domain from CI_PAGES_URL
ci_baseurl="${CI_PAGES_URL##*$CI_PAGES_DOMAIN}"
......
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