Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sito
poul.org
Commits
82d78033
Commit
82d78033
authored
Apr 12, 2021
by
Andrew
Browse files
Merge branch 'new_site' of
https://gitlab.poul.org/sito/poul-jekyll
into new_site
parents
b280061d
a8b5f58f
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
82d78033
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment