Skip to content
Snippets Groups Projects
Commit 014e4ea8 authored by Marek Chrastina's avatar Marek Chrastina
Browse files

Merge branch 'mkdocscheck' into 'master'

Replace davidhrbac/docker-mkdocscheck with it4innovations/docker-mkdocscheck

See merge request !239
parents 989674e4 52c3beae
No related branches found
No related tags found
5 merge requests!368Update prace.md to document the change from qprace to qprod as the default...,!367Update prace.md to document the change from qprace to qprod as the default...,!366Update prace.md to document the change from qprace to qprod as the default...,!323extended-acls-storage-section,!239Replace davidhrbac/docker-mkdocscheck with it4innovations/docker-mkdocscheck
...@@ -16,19 +16,10 @@ docs: ...@@ -16,19 +16,10 @@ docs:
capitalize: capitalize:
stage: test stage: test
image: davidhrbac/docker-mkdocscheck:latest image: it4innovations/docker-mkdocscheck:latest
# allow_failure: true
script: script:
- find mkdocs.yml docs.it4i/ \( -name '*.md' -o -name '*.yml' \) -print0 | xargs -0 -n1 scripts/titlemd_test.py - find mkdocs.yml docs.it4i/ \( -name '*.md' -o -name '*.yml' \) -print0 | xargs -0 -n1 scripts/titlemd_test.py
#spell check:
#stage: test
#image: davidhrbac/docker-npmcheck:latest
#allow_failure: true
#script:
#- npm i markdown-spellcheck -g
#- mdspell '**/*.md' '!docs.it4i/module*.md' -rns --en-us
ext_links: ext_links:
stage: test stage: test
image: it4innovations/docker-mdcheck:latest image: it4innovations/docker-mdcheck:latest
...@@ -43,25 +34,23 @@ ext_links: ...@@ -43,25 +34,23 @@ ext_links:
404s: 404s:
stage: after_test stage: after_test
image: davidhrbac/docker-mkdocscheck:latest image: it4innovations/docker-mkdocscheck:latest
before_script: before_script:
- wget -V - wget -V
- echo https://docs.it4i.cz/devel/$CI_BUILD_REF_NAME/ - 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 - wget --spider -e robots=off -o wget.log -r -p https://docs.it4i.cz/devel/$CI_BUILD_REF_NAME/ || true
#- wget --spider -e robots=off -r -p https://docs.it4i.cz/devel/$CI_BUILD_REF_NAME/
script: script:
- cat wget.log | awk '/^Found [0-9]+ broken link[s]?.$/,/FINISHED/ { rc=-1; print $0 }; END { exit rc }' - cat wget.log | awk '/^Found [0-9]+ broken link[s]?.$/,/FINISHED/ { rc=-1; print $0 }; END { exit rc }'
mkdocs: mkdocs:
stage: build stage: build
image: davidhrbac/docker-mkdocscheck:latest image: it4innovations/docker-mkdocscheck:latest
cache: cache:
paths: paths:
- .cache/pip - .cache/pip
- venv/ - venv/
before_script: before_script:
- python -V # Print out python version for debugging - python -V # Print out python version for debugging
- pip install virtualenv
- virtualenv venv - virtualenv venv
- source venv/bin/activate - source venv/bin/activate
- pip install -r requirements.txt - pip install -r requirements.txt
...@@ -81,8 +70,6 @@ mkdocs: ...@@ -81,8 +70,6 @@ mkdocs:
- curl -f0 https://scs-test.it4i.cz/devel/apidocs/master/scs_api.server_public.md -o docs.it4i/apiv1.md - curl -f0 https://scs-test.it4i.cz/devel/apidocs/master/scs_api.server_public.md -o docs.it4i/apiv1.md
# build pages # build pages
- mkdocs build - mkdocs build
# compress search_index.json
#- bash scripts/clean_json.sh site/mkdocs/search_index.json
# replace broken links in 404.html # replace broken links in 404.html
- sed -i 's,href="" title=",href="/" title=",g' site/404.html - sed -i 's,href="" title=",href="/" title=",g' site/404.html
- cp site/404.html site/403.html - cp site/404.html site/403.html
...@@ -97,7 +84,7 @@ mkdocs: ...@@ -97,7 +84,7 @@ mkdocs:
deploy to stage: deploy to stage:
environment: stage environment: stage
stage: deploy stage: deploy
image: davidhrbac/docker-mkdocscheck:latest image: it4innovations/docker-mkdocscheck:latest
before_script: before_script:
# install ssh-agent # install ssh-agent
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
...@@ -110,7 +97,6 @@ deploy to stage: ...@@ -110,7 +97,6 @@ deploy to stage:
# WARNING: use only in docker container, if you use it with shell you will overwrite your user's ssh config # WARNING: use only in docker container, if you use it with shell you will overwrite your user's ssh config
- mkdir -p ~/.ssh - mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- useradd -lM nginx
script: script:
- chown nginx:nginx site -R - chown nginx:nginx site -R
- rsync -a --delete site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/devel/$CI_BUILD_REF_NAME/ - rsync -a --delete site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/devel/$CI_BUILD_REF_NAME/
...@@ -120,7 +106,7 @@ deploy to stage: ...@@ -120,7 +106,7 @@ deploy to stage:
deploy to production: deploy to production:
environment: production environment: production
stage: deploy stage: deploy
image: davidhrbac/docker-mkdocscheck:latest image: it4innovations/docker-mkdocscheck:latest
before_script: before_script:
# install ssh-agent # install ssh-agent
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
...@@ -133,7 +119,6 @@ deploy to production: ...@@ -133,7 +119,6 @@ deploy to production:
# WARNING: use only in docker container, if you use it with shell you will overwrite your user's ssh config # WARNING: use only in docker container, if you use it with shell you will overwrite your user's ssh config
- mkdir -p ~/.ssh - mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- useradd -lM nginx
script: script:
- chown nginx:nginx site -R - chown nginx:nginx site -R
- rsync -a --delete site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/site/ - rsync -a --delete site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/site/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment