You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.drone.yml 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. kind: pipeline
  2. name: default
  3. steps:
  4. - name: restore cache
  5. image: drillster/drone-volume-cache
  6. settings:
  7. restore: true
  8. mount:
  9. - ./node_modules
  10. volumes:
  11. - name: cache
  12. path: /cache
  13. - name: npm install
  14. image: node:12
  15. commands:
  16. - npm install
  17. - name: npm run build
  18. image: node:12
  19. commands:
  20. - npm run build
  21. - name: rebuild cache
  22. image: drillster/drone-volume-cache
  23. settings:
  24. rebuild: true
  25. mount:
  26. - ./node_modules
  27. volumes:
  28. - name: cache
  29. path: /cache
  30. - name: show tag
  31. image: alpine
  32. commands:
  33. - echo ${DRONE_BUILD_CREATED}
  34. - name: npm run test
  35. image: node:12
  36. commands:
  37. - npm run test
  38. - name: npm run docs
  39. image: node:12
  40. commands:
  41. - npm run docs
  42. - name: git checkin docs
  43. image: node:12
  44. commands:
  45. - git config --global user.email "${DRONE_COMMIT_AUTHOR_EMAIL}"
  46. - git config --global user.name "${DRONE_COMMIT_AUTHOR}"
  47. - git clone https://gitea.frontblock.me/fw-vendor/${DRONE_REPO_NAME}.git
  48. - rm -rf ./${DRONE_REPO_NAME}/docs/*
  49. - cp -r ./docs ./${DRONE_REPO_NAME}/docs
  50. - ls ./${DRONE_REPO_NAME}
  51. - cd ./${DRONE_REPO_NAME}
  52. - git add -f docs
  53. - git commit --allow-empty -m "drone tagged as version ${DRONE_BUILD_CREATED}"
  54. - git tag ${DRONE_BUILD_CREATED}
  55. - git status
  56. - git push https://$GIT_USER:$GIT_PASSWORD@gitea.frontblock.me/fw-vendor/${DRONE_REPO_NAME}.git master ${DRONE_BUILD_CREATED}
  57. environment:
  58. GIT_USER:
  59. from_secret: git_user
  60. GIT_PASSWORD:
  61. from_secret: git_password
  62. - name: npm publish
  63. image: plugins/npm
  64. settings:
  65. username: frontwork
  66. password:
  67. from_secret: npm_password
  68. email: frontwork.me@gmail.com
  69. volumes:
  70. - name: cache
  71. host:
  72. path: /tmp