Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

.drone.yml 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. ---
  2. kind: pipeline
  3. type: docker
  4. name: default
  5. steps:
  6. - name: restore cache
  7. image: drillster/drone-volume-cache
  8. settings:
  9. restore: true
  10. mount:
  11. - ./node_modules
  12. volumes:
  13. - name: cache
  14. path: /cache
  15. - name: npm install
  16. image: node:12
  17. commands:
  18. - npm install
  19. - name: npm run build
  20. image: node:12
  21. commands:
  22. - npm run build
  23. - name: rebuild cache
  24. image: drillster/drone-volume-cache
  25. settings:
  26. rebuild: true
  27. mount:
  28. - ./node_modules
  29. volumes:
  30. - name: cache
  31. path: /cache
  32. - name: npm run test
  33. image: node:12
  34. commands:
  35. - npm run test
  36. - name: build docs
  37. image: node:12
  38. commands:
  39. - npm run docs
  40. when:
  41. event:
  42. - tag
  43. - name: npm publish
  44. image: plugins/npm
  45. settings:
  46. username: frontwork
  47. password:
  48. from_secret: npm_password
  49. email: frontwork.me@gmail.com
  50. when:
  51. event:
  52. - tag
  53. - name: deliver docs
  54. image: node:12
  55. commands:
  56. - echo ${DRONE_BUILD_CREATED}
  57. - git clone https://www.versioncontrol.me/frontwork-documentation/${DRONE_REPO_NAME}.git && cd ${DRONE_REPO_NAME} && rm -rf ./*; cp -r ../docs/* .
  58. - sed -i '1,3d; $d' README.md && echo "### Version\n\n${DRONE_TAG}\n" >> ./README.md
  59. - sed -i -e 1,4d ./globals.md && cat ./globals.md >> ./README.md
  60. - git -c user.email="${DRONE_COMMIT_AUTHOR_EMAIL}" -c user.name="${DRONE_COMMIT_AUTHOR}" commit --all --allow-empty --message "generated from tag ${DRONE_TAG}"
  61. - git tag ${DRONE_TAG} && git push --force origin master ${DRONE_TAG}
  62. environment:
  63. GIT_USER:
  64. from_secret: git_user
  65. GIT_PASSWORD:
  66. from_secret: git_password
  67. when:
  68. event:
  69. - tag
  70. volumes:
  71. - name: cache
  72. host:
  73. path: /tmp