Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
documentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
e-INFRA.cz
documentation
Commits
d96bc24f
Verified
Commit
d96bc24f
authored
3 years ago
by
Adrián Rošinec
Browse files
Options
Downloads
Patches
Plain Diff
Deployment of einfra docs
parent
d0a065db
No related branches found
No related tags found
No related merge requests found
Pipeline
#156804
failed
3 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+42
-42
42 additions, 42 deletions
.gitlab-ci.yml
mkdocs.yml
+16
-17
16 additions, 17 deletions
mkdocs.yml
with
58 additions
and
59 deletions
.gitlab-ci.yml
+
42
−
42
View file @
d96bc24f
...
...
@@ -53,10 +53,9 @@ ext_links:
stage
:
after_test
image
:
it4innovations/docker-mkdocscheck:latest
before_script
:
-
echo "192.168.101.10 docs.it4i.cz" >> /etc/hosts
-
wget -V
-
echo https://
docs.it4i.cz/devel
/$CI_BUILD_REF_NAME/
-
wget --spider -e robots=off -o wget.log -r -p https://
docs.it4i.cz/devel
/$CI_BUILD_REF_NAME/ ||
true
-
echo https://
${HOSTING_HOST}/review
/$CI_BUILD_REF_NAME/
-
wget --spider -e robots=off -o wget.log -r -p https://
${HOSTING_HOST}/review
/$CI_BUILD_REF_NAME/ ||
true
script
:
-
cat wget.log | awk '/^Found [0-9]+ broken link[s]?.$/,/FINISHED/ { rc=-1; print $0 }; END { exit rc }'
...
...
@@ -94,47 +93,48 @@ mkdocs:
-
site
expire_in
:
1 week
deploy to stage
:
environment
:
stage
.prepare_deploy
:
&prepare_deploy
stage
:
deploy
image
:
it4innovations/docker-mkdocscheck:latest
before_script
:
# install ssh-agent
-
'
which
ssh-agent
||
(
apt-get
update
-y
&&
apt-get
install
openssh-client
-y
)'
-
'
which
rsync
||
(
apt-get
update
-y
&&
apt-get
install
rsync
-y
)'
# run ssh-agent
-
eval $(ssh-agent -s)
# add ssh key stored in SSH_PRIVATE_KEY variable to the agent store
-
ssh-add <(echo "$SSH_PRIVATE_KEY")
# disable host key checking (NOTE: makes you susceptible to man-in-the-middle attacks)
# WARNING: use only in docker container, if you use it with shell you will overwrite your user's ssh config
-
mkdir -p ~/.ssh
-
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
before_script
:
-
apk update && apk add rsync
-
eval $(ssh-agent -s)
-
echo "$SSH_HOSTING_KEY" | tr -d '\r' | ssh-add -
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
echo "$SSH_KNOWN_HOSTS__HOSTING" >> ~/.ssh/known_hosts
-
chmod 644 ~/.ssh/known_hosts
deploy production
:
needs
:
[
"
build_docs"
]
environment
:
name
:
production
url
:
https://${HOSTING_HOST}
script
:
-
chown nginx:nginx site -R
-
rsync -a --delete site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/devel/$CI_BUILD_REF_NAME/
-
rsync -a -e "ssh -o StrictHostKeyChecking=no" --delete --exclude=/review site/ ${HOSTING_USERNAME}@${HOSTING_HOST}:~/public_html
only
:
-
branches@sccs/docs.it4i.cz
-
master
<<
:
*prepare_deploy
deploy to production
:
environment
:
production
stage
:
deploy
image
:
it4innovations/docker-mkdocscheck:latest
before_script
:
# install ssh-agent
-
'
which
ssh-agent
||
(
apt-get
update
-y
&&
apt-get
install
openssh-client
-y
)'
-
'
which
rsync
||
(
apt-get
update
-y
&&
apt-get
install
rsync
-y
)'
# run ssh-agent
-
eval $(ssh-agent -s)
# add ssh key stored in SSH_PRIVATE_KEY variable to the agent store
-
ssh-add <(echo "$SSH_PRIVATE_KEY")
# disable host key checking (NOTE: makes you susceptible to man-in-the-middle attacks)
# WARNING: use only in docker container, if you use it with shell you will overwrite your user's ssh config
-
mkdir -p ~/.ssh
-
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
deploy dev
:
needs
:
[
"
build_docs"
]
environment
:
name
:
review/$CI_COMMIT_REF_SLUG
url
:
https://${HOSTING_HOST}/review/$CI_COMMIT_REF_SLUG
<<
:
*prepare_deploy
script
:
-
chown nginx:nginx site -R
-
rsync -a --delete site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/site/
only
:
-
master@sccs/docs.it4i.cz
when
:
manual
-
rsync -a -e "ssh -o StrictHostKeyChecking=no" --delete --exclude=/review site/ ${HOSTING_USERNAME}@${HOSTING_HOST}:~/public_html/review/$CI_COMMIT_REF_SLUG
rules
:
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when
:
never
-
if
:
$CI_COMMIT_BRANCH
stop_review
:
<<
:
*prepare_deploy
script
:
-
ssh -o StrictHostKeyChecking=no ${HOSTING_USERNAME}@${HOSTING_HOST} rm -rf ~/public_html/review/$CI_COMMIT_REF_SLUG
environment
:
name
:
review/$CI_COMMIT_REF_SLUG
action
:
stop
rules
:
-
if
:
$CI_MERGE_REQUEST_ID
when
:
manual
This diff is collapsed.
Click to expand it.
mkdocs.yml
+
16
−
17
View file @
d96bc24f
site_name
:
IT4Innovations
Documentation
site_name
:
e-INFRA.CZ
Documentation
docs_dir
:
docs.it4i
site_url
:
https://docs.
it4i
.cz/
site_url
:
https://docs.
e-infra
.cz/
extra_css
:
-
src/css.css?id=2018100501
-
https://unpkg.com/mermaid@7.0.5/dist/mermaid.css
...
...
@@ -13,7 +13,7 @@ repo_name: sccs/docs.it4i.cz
repo_url
:
https://code.it4i.cz/sccs/docs.it4i.cz
# Copyright
copyright
:
Copyright (c) 2013-__YEAR__
IT4Innovations
__VERSION__
copyright
:
Copyright (c) 2013-__YEAR__
e-infra.cz - e-infrastructure for research
__VERSION__
theme
:
name
:
material
...
...
@@ -28,10 +28,9 @@ theme:
-
navigation.tabs
#- tabs
#- instant
icon
:
logo
:
fontawesome/solid/book-open
repo
:
fontawesome/brands/gitlab
# icon:
# logo: fontawesome/solid/book-open
# repo: fontawesome/brands/gitlab
# Don't include MkDocs' JavaScript
include_search_page
:
false
...
...
@@ -240,13 +239,13 @@ nav:
-
VESTA
:
software/viz/vesta.md
-
PBS Pro Documentation
:
pbspro.md
extra
:
disqus
:
'
test-3whnesz3gq'
social
:
-
icon
:
'
fontawesome/brands/gitlab'
link
:
'
https://code.it4i.cz/sccs/docs.it4i.cz'
-
icon
:
fontawesome/solid/globe-europe
link
:
https://www.it4i.cz
#
extra:
#
disqus: 'test-3whnesz3gq'
#
social:
#
- icon: 'fontawesome/brands/gitlab'
#
link: 'https://code.it4i.cz/sccs/docs.it4i.cz'
#
- icon: fontawesome/solid/globe-europe
#
link: https://www.it4i.cz
plugins
:
-
search
:
...
...
@@ -267,6 +266,6 @@ markdown_extensions:
-
footnotes
-
pymdownx.superfences
google_analytics
:
-
'
UA-90498826-1'
-
'
auto'
#
google_analytics:
#
- 'UA-90498826-1'
#
- 'auto'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment