Verified Commit 7797d02d authored by Davide Depau's avatar Davide Depau
Browse files

Rewrite CI stuff in order to build main site

parent 7d69cfbf
Pipeline #58 failed
...@@ -5,20 +5,36 @@ variables: ...@@ -5,20 +5,36 @@ variables:
LC_ALL: C.UTF-8 LC_ALL: C.UTF-8
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
pages: stages:
stage: deploy - build
- deploy
before_script:
- apt install rsync
- ./scripts/ci_fix_baseurl.sh
build:
stage: build
cache:
key: gems
paths:
- "/usr/local/bundle/cache"
script: script:
- bundle install - bundle install
- ./scripts/ci_fix_baseurl.sh
- jekyll build -d public - jekyll build -d public
production:
stage: deploy
script:
- ./scripts/ci_deploy_site.sh public
only:
- master
pages:
stage: deploy
artifacts: artifacts:
paths: paths:
- public - public
cache:
key: gems
paths:
- "vendor/bundle"
- "$HOME/.bundle"
only: 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 ...@@ -5,6 +5,11 @@ if [[ "$CI_JOB_ID" == "" ]]; then
exit exit
fi 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 # Remove everything before the domain from CI_PAGES_URL
ci_baseurl="${CI_PAGES_URL##*$CI_PAGES_DOMAIN}" 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