Commit 82d78033 authored by Andrew's avatar Andrew
Browse files

Merge branch 'new_site' of https://gitlab.poul.org/sito/poul-jekyll into new_site

parents b280061d a8b5f58f
image: jekyll/builder
stages:
- build
- deploy
variables:
JEKYLL_ENV: production
LC_ALL: C.UTF-8
GIT_SUBMODULE_STRATEGY: recursive
BUNDLE_USER_HOME: ./bundle
# Build is in `before_script` because it's the same for both deployments
before_script:
- git submodule update --remote ./_posts/
- git submodule update --remote ./_data/courses/
- git submodule update --remote ./_data/coding_gym/
- bundle install
- ./scripts/ci_fix_baseurl.sh
- bundle exec jekyll build
- mv _site public
- ln -sf faq_mailinglist/index.html "public/faq_mailinglist.html"
deploy-prod:
stage: deploy
build:
image: jekyll/builder:4.0
stage: build
script:
- apk add rsync
- mkdir -p "$HOME/.ssh"
- echo "$SSH_KNOWN_HOSTS" > "$HOME/.ssh/known_hosts"
- chmod 700 "$HOME/.ssh/known_hosts"
- chmod 700 "$SSH_DEPLOY_KEY"
- rsync -e "ssh -i $SSH_DEPLOY_KEY" --delete-after -rlptP public/ "$SSH_DEPLOY_USER@$SSH_DEPLOY_HOST:/www.poul.org/"
cache:
key: build-deps
- mkdir public
- chown -R jekyll:jekyll
- jekyll build -d public
artifacts:
paths:
- "bundle/"
- public
expire_in: 1 day
only:
- master
- develop
- master
pages:
deploy_pages:
stage: deploy
script:
- echo "Already built."
artifacts:
paths:
- public
cache:
key: build-deps
paths:
- "bundle/"
- public
only:
- develop
deploy_prod:
stage: deploy
image: alpine:3.13
script:
- apk add rsync openssh
- mkdir -p "$HOME/.ssh"
- echo "$SSH_KNOWN_HOSTS" > "$HOME/.ssh/known_hosts"
- chmod 700 "$HOME/.ssh/known_hosts"
- chmod 700 "$SSH_DEPLOY_KEY"
- rsync -e "ssh -i $SSH_DEPLOY_KEY" --delete-after -rlptP public/ "$SSH_DEPLOY_USER@$SSH_DEPLOY_HOST:/www.poul.org/"
only:
- develop
- master
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