Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Sito
poul.org
Commits
7797d02d
Verified
Commit
7797d02d
authored
Sep 24, 2019
by
Davide Depau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rewrite CI stuff in order to build main site
parent
7d69cfbf
Pipeline
#58
failed
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
9 deletions
+41
-9
.gitlab-ci.yml
.gitlab-ci.yml
+25
-9
scripts/ci_deploy_site.sh
scripts/ci_deploy_site.sh
+11
-0
scripts/ci_fix_baseurl.sh
scripts/ci_fix_baseurl.sh
+5
-0
No files found.
.gitlab-ci.yml
View file @
7797d02d
...
...
@@ -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
scripts/ci_deploy_site.sh
0 → 100755
View file @
7797d02d
#!/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
scripts/ci_fix_baseurl.sh
View file @
7797d02d
...
...
@@ -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
}
"
...
...
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