Skip to content
Snippets Groups Projects
Forked from SCS / docs.it4i.cz
1528 commits behind, 1106 commits ahead of the upstream repository.
.gitlab-ci.yml 4.14 KiB
stages:
  - test
  - build
  - deploy
  - production

docs:
  stage: test
  image: davidhrbac/docker-mdcheck:latest
  allow_failure: true
  script:
  - mdl -r ~MD013,~MD033,~MD014,~MD026,~MD037 *.md docs.it4i/

two spaces:
  stage: test
  image: davidhrbac/docker-mdcheck:latest
  allow_failure: true
  script:
  - echo "== Files having more than one space betwee two characters =="
  - find docs.it4i/ -name '*.md' -exec grep "[[:alpha:]]  [[:alpha:]]" -l {} + || true

capitalize:
  stage: test
  image: davidhrbac/docker-mkdocscheck:latest
  allow_failure: true
  script:
  - find docs.it4i/ -name '*.md' -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' '!docs.it4i/anselm-cluster-documentation/software/omics-master/overview.md' '!docs.it4i/downtimes_history.md' -rns --en-us

ext_links:
  stage: test
  image: davidhrbac/docker-mdcheck:latest
  allow_failure: true
  after_script:
  - rm *.json
  script:
  #- find docs.it4i/ -name '*.md' -exec grep --color -l http {} + | xargs awesome_bot -t 10
  #- find docs.it4i/ -name '*.md' -exec grep --color -l http {} + | xargs awesome_bot -t 10 --allow-dupe --allow-redirect
  - find docs.it4i/ -name '*.md' ! -name 'modules-*.md' -exec grep --color -l http {} + | xargs awesome_bot -t 10 --allow-dupe --allow-redirect
  only:
  - master

mkdocs:
  stage: build
  image: davidhrbac/docker-mkdocscheck:latest
  script:
  #- apt-get update
  #- apt-get -y install git
    # add version to footer
  - bash scripts/add_version.sh
    # get modules list from clusters 
  - bash scripts/get_modules.sh
    # build pages
  - mkdocs build
    # compress search_index.json
  - bash scripts/clean_json.sh site/mkdocs/search_index.json
    # replace broken links in 404.html
  - sed -i 's,href="" title=",href="/" title=",g' site/404.html
    # compress sitemap
  - gzip < site/sitemap.xml > site/sitemap.xml.gz  
  artifacts:
    paths:
    - site