Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

.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 '$ 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 commit --all --allow-empty --message "drone tag: ${DRONE_TAG}" --author "${DRONE_COMMIT_AUTHOR} <${DRONE_COMMIT_AUTHOR_EMAIL}>"
  61. - git push --force origin master
  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