Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Fragner
website-digkom
Commits
448b3703
Commit
448b3703
authored
Jul 23, 2019
by
Thomas Fragner
Browse files
Merge branch 'test-compile' into 'master'
Test compile See merge request
!1
parents
185af225
d6f4c3e4
Pipeline
#650
passed with stages
in 9 minutes and 2 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
448b3703
include
:
'
https://gitlab.ce.jku.at/templates/gitlab-ci-templates/raw/master/.gitlab-ci-for-academic-431.yml'
# This file is a template, and might need editing before it works on your project.
# Full project: https://gitlab.com/pages/hugo
image
:
meroff/hugo-with-pandoc:academic431
stages
:
-
build
-
combine
-
review
-
publish
.build-prepare
:
stage
:
build
before_script
:
-
git checkout .
-
git submodule foreach git checkout .
-
git submodule update --init --remote --recursive
-
cd themes/academic
-
git checkout v4.4.0
-
cd ../../
-
cd content/courses
-
git checkout tf-rework-structure-for-hugo
-
cd ../../
-
python3.6 -m venv venv
-
source venv/bin/activate
-
pip install -r .pandoc/requirements.txt
-
cp -purv .pandoc ~/
build-hugo-branches
:
extends
:
.build-prepare
stage
:
build
script
:
-
hugo --baseURL https://deploy.ce.jku.at/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_COMMIT_REF_NAME/
artifacts
:
when
:
always
paths
:
-
public
only
:
-
branches
except
:
-
master
allow_failure
:
true
build-hugo-master
:
extends
:
.build-prepare
stage
:
build
script
:
-
hugo --baseURL https://pages.ce.jku.at/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/public/
artifacts
:
when
:
always
paths
:
-
public
only
:
-
master
allow_failure
:
true
build-pdf
:
extends
:
.build-prepare
stage
:
build
script
:
-
./bin/compile-pdf.sh
artifacts
:
paths
:
-
build
only
:
variables
:
-
$GENERATE_PDF == "true"
combine
:
stage
:
combine
script
:
-
if [[ -e build ]] ; then cp -purv build/pdf/content/* public/ ; rm -rf build ; fi
artifacts
:
paths
:
-
public
only
:
variables
:
-
$GENERATE_PDF == "true"
review
:
image
:
meroff/hugo-deploy
stage
:
review
before_script
:
-
eval $(ssh-agent -s)
-
echo "$PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
ssh-keyscan -p 2122 deploy.ce.jku.at > ~/.ssh/known_hosts
script
:
-
ssh -p 2122 deploy@deploy.ce.jku.at "mkdir -p /home/deploy/data/deploy/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_COMMIT_REF_NAME"
-
rsync -av -e "ssh -p 2122" --delete public/* "deploy@deploy.ce.jku.at:/home/deploy/data/deploy/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_COMMIT_REF_NAME/"
environment
:
name
:
review/$CI_BUILD_REF_NAME
url
:
https://deploy.ce.jku.at/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_COMMIT_REF_NAME
on_stop
:
stop_review
only
:
-
branches
except
:
-
master
stop_review
:
image
:
meroff/hugo-deploy
stage
:
review
before_script
:
-
eval $(ssh-agent -s)
-
echo "$PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
ssh-keyscan -p 2122 deploy.ce.jku.at > ~/.ssh/known_hosts
script
:
-
ssh -p 2122 deploy@deploy.ce.jku.at "rm -rf /home/deploy/data/deploy/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_COMMIT_REF_NAME"
variables
:
GIT_STRATEGY
:
none
when
:
manual
environment
:
name
:
review/$CI_BUILD_REF_NAME
action
:
stop
only
:
-
branches
except
:
-
master
pages
:
stage
:
publish
script
:
-
ls -lrta
-
echo "Copy To Pages"
artifacts
:
paths
:
-
public
only
:
-
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