選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

.drone.yml 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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: deliver docs
  44. image: node:12
  45. commands:
  46. - echo ${DRONE_BUILD_CREATED}
  47. - export GIT_SSL_NO_VERIFY=1
  48. - git clone https://gitea.nitowa.xyz/docs/${DRONE_REPO_NAME}.git; cd ${DRONE_REPO_NAME} && rm -rf ./*; cp -r ../docs/* .; cp ../LICENSE.md .
  49. - sed -i '1,3d; $d' README.md && echo "### Version\n\n${DRONE_TAG}\n" >> ./README.md
  50. - sed -i -e 1,4d ./globals.md && cat ./globals.md >> ./README.md
  51. - 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}"
  52. - (git tag ${DRONE_TAG} && git push --force origin master ${DRONE_TAG}) || true
  53. environment:
  54. GIT_USER:
  55. from_secret: git_user
  56. GIT_PASSWORD:
  57. from_secret: git_password
  58. when:
  59. event:
  60. - tag
  61. - name: npm publish
  62. image: plugins/npm
  63. settings:
  64. username: nitowa
  65. password:
  66. from_secret: npm_password
  67. token:
  68. from_secret: npm_access_token
  69. email: peter.millauer@gmail.com
  70. when:
  71. event:
  72. - tag
  73. volumes:
  74. - name: cache
  75. host:
  76. path: /tmp