Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. version: 2
  2.  
  3. workflows:
  4. version: 2
  5. build:
  6. jobs:
  7. - build
  8. - deploy:
  9. requires:
  10. - build
  11. filters:
  12. branches:
  13. only: master
  14.  
  15. jobs:
  16. build:
  17. docker:
  18. - image: cibuilds/hugo:latest
  19. working_directory: ~/blog
  20. environment:
  21. HUGO_BUILD_DIR: public
  22. steps:
  23. - run: apk update && apk add git
  24. - checkout
  25. - run: HUGO_ENV=production hugo -F -v -d $HUGO_BUILD_DIR
  26. - persist_to_workspace:
  27. root: public
  28. paths: .
  29. deploy:
  30. docker:
  31. - image: node:8.10.0
  32. steps:
  33. - checkout
  34. - attach_workspace:
  35. at: public
  36. - run:
  37. name: Disable jekyll builds
  38. command: touch public/.nojekyll
  39. - run:
  40. name: Custom Domain
  41. command: echo "example.domain" > public/CNAME
  42. - run:
  43. name: Install and configure dependencies
  44. command: |
  45. npm install -g --silent gh-pages@2.0.1
  46. git config user.email "ci-build@example.domain"
  47. git config user.name "ci-build"
  48. - add_ssh_keys:
  49. fingerprints:
  50. - "a4:2f:c8:ed:e9:cd:b7:70:36:18:f8:55:c9:16:f2:5c"
  51. - run:
  52. name: Delete All SSH keys and Add the installed one
  53. command: ssh-add -D && ssh-add ~/.ssh/id_rsa_a42fc8ede9cdb7703618f855c916f25c
  54. - run:
  55. name: Deploy docs to gh-pages branch
  56. command: gh-pages --dotfiles --message "[skip ci] Updates" --dist public
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement