docs.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. ---
  2. when:
  3. - event: [pull_request, tag]
  4. - event: [push, manual]
  5. branch:
  6. - ${CI_REPO_DEFAULT_BRANCH}
  7. steps:
  8. - name: markdownlint
  9. image: quay.io/thegeeklab/markdownlint-cli
  10. commands:
  11. - markdownlint 'exampleSite/content/**/*.md' 'README.md' 'CONTRIBUTING.md'
  12. - name: spellcheck
  13. image: quay.io/thegeeklab/alpine-tools
  14. commands:
  15. - spellchecker --files 'exampleSite/content/**/*.md' 'README.md' -d .dictionary -p spell indefinite-article syntax-urls frontmatter --frontmatter-keys title
  16. environment:
  17. FORCE_COLOR: "true"
  18. - name: assets
  19. image: docker.io/library/node:lts
  20. commands:
  21. - npm install --quiet --no-progress
  22. - npm run svg-sprite-list
  23. - mkdir -p exampleSite/themes/${CI_REPO_NAME}
  24. - curl -sSL https://github.com/${CI_REPO}/releases/latest/download/${CI_REPO_NAME}.tar.gz | tar -xz -C exampleSite/themes/${CI_REPO_NAME}/ --strip-components=1
  25. when:
  26. - event: [tag]
  27. - event: [push, manual]
  28. branch:
  29. - ${CI_REPO_DEFAULT_BRANCH}
  30. - name: assets-main
  31. image: docker.io/library/node:lts
  32. commands:
  33. - npm install --quiet --no-progress
  34. - npm run build
  35. - npm run svg-sprite-list
  36. - mkdir -p exampleSite/themes/ && ln -s $(pwd)/ exampleSite/themes/${CI_REPO_NAME}
  37. environment:
  38. FORCE_COLOR: "true"
  39. when:
  40. - event: [pull_request]
  41. - name: build
  42. image: quay.io/thegeeklab/hugo:0.136.5
  43. commands:
  44. - hugo --panicOnWarning -s exampleSite/
  45. - name: beautify
  46. image: quay.io/thegeeklab/alpine-tools
  47. commands:
  48. - html-beautify -r -f 'exampleSite/public/**/*.html'
  49. environment:
  50. FORCE_COLOR: "true"
  51. - name: publish
  52. image: quay.io/thegeeklab/wp-s3-action
  53. settings:
  54. access_key:
  55. from_secret: s3_access_key
  56. bucket: geekdocs-root
  57. delete: true
  58. endpoint:
  59. from_secret: s3_endpoint
  60. path_style: true
  61. secret_key:
  62. from_secret: s3_secret_access_key
  63. source: exampleSite/public/
  64. strip_prefix: exampleSite/public/
  65. when:
  66. - event: [tag]
  67. - event: [push, manual]
  68. branch:
  69. - ${CI_REPO_DEFAULT_BRANCH}
  70. status: [success, failure]
  71. depends_on:
  72. - build-package