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.7KB

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:14
  17. commands:
  18. - npm install
  19. - name: npm run build
  20. image: node:14
  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:14
  34. commands:
  35. - npm run test
  36. - name: build docs
  37. image: node:14
  38. commands:
  39. - npm run docs
  40. when:
  41. event:
  42. - tag
  43. - name: deliver docs
  44. image: node:12
  45. commands:
  46. - echo ${DRONE_BUILD_CREATED}
  47. - git clone https://gitea.nitowa.xyz/docs/${DRONE_REPO_NAME}.git; cd ${DRONE_REPO_NAME} && rm -rf ./*; cp -r ../docs/* .; cp ../LICENSE.md .
  48. - sed -i '1,3d; $d' README.md && echo "### Version\n\n${DRONE_TAG}\n" >> ./README.md
  49. - sed -i -e 1,4d ./globals.md && cat ./globals.md >> ./README.md
  50. - git add --all; git -c user.email="${DRONE_COMMIT_AUTHOR_EMAIL}" -c user.name="${DRONE_COMMIT_AUTHOR}" commit --all --allow-empty --message "generated from tag ${DRONE_TAG}"
  51. - (git tag ${DRONE_TAG} && git push --force origin master ${DRONE_TAG}) || true
  52. environment:
  53. GIT_USER:
  54. from_secret: git_user
  55. GIT_PASSWORD:
  56. from_secret: git_password
  57. when:
  58. event:
  59. - tag
  60. - name: npm publish
  61. image: plugins/npm
  62. settings:
  63. username: nitowa
  64. password:
  65. from_secret: npm_password
  66. email: peter.millauer@gmail.com
  67. when:
  68. event:
  69. - tag
  70. volumes:
  71. - name: cache
  72. host:
  73. path: /tmp