1
0

.gitlab-ci.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # This file is a template, and might need editing before it works on your project.
  2. # To contribute improvements to CI/CD templates, please follow the Development guide at:
  3. # https://docs.gitlab.com/ee/development/cicd/templates.html
  4. # This specific template is located at:
  5. # https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Pages/Jekyll.gitlab-ci.yml
  6. # Template project: https://gitlab.com/pages/jekyll
  7. # Docs: https://docs.gitlab.com/ee/pages/
  8. image: ruby:2.6
  9. variables:
  10. JEKYLL_ENV: production
  11. LC_ALL: C.UTF-8
  12. before_script:
  13. - gem install bundler
  14. - bundle install
  15. test:
  16. stage: test
  17. script:
  18. - bundle exec jekyll build -d test
  19. artifacts:
  20. paths:
  21. - test
  22. except:
  23. variables:
  24. - $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
  25. pages:
  26. stage: deploy
  27. script:
  28. - git clone https://github.com/Mabbs/Mabbs
  29. - bundle exec jekyll build -d public
  30. - rm -rf .jekyll-cache/
  31. - tar czvf ../MayxBlog.tgz .
  32. - mv ../MayxBlog.tgz public/
  33. artifacts:
  34. paths:
  35. - public
  36. only:
  37. variables:
  38. - $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH