NEXT craftinamerica.org. Base setup for headless wordpress https://www.craftinamerica.org
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

.drone.yml 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. ---
  2. ################
  3. # Build & Test #
  4. ################
  5. kind: pipeline
  6. name: run_tests
  7. steps:
  8. # Test the vue theme
  9. - name: test
  10. image: node
  11. commands:
  12. - pwd
  13. - cd ./vue-theme
  14. - npm install
  15. - npm test
  16. volumes:
  17. # Link node_modules cache from host filesystem into container at the expected location
  18. - name: node_cache
  19. path: /drone/src/vue-theme/node_modules
  20. - name: build
  21. image: node
  22. commands:
  23. - cd ./vue-theme
  24. - rm -Rf ./build/*
  25. - npm run build
  26. - ls ./build
  27. volumes:
  28. # Link node_modules cache from host filesystem into container at the expected location
  29. - name: node_cache
  30. path: /drone/src/vue-theme/node_modules
  31. - name: build
  32. path: /drone/src/vue-theme/build
  33. volumes:
  34. - name: node_cache
  35. host:
  36. path: /tmp/cache/drone/node_modules
  37. - name: build
  38. host:
  39. path: /tmp/cache/drone/build
  40. ---
  41. ########################
  42. # Deploy to Production #
  43. ########################
  44. kind: pipeline
  45. name: deploy
  46. depends_on:
  47. # Must run after the first pipeline
  48. - run_tests
  49. trigger:
  50. status:
  51. # Only runs if the first pipeline was fully successful
  52. - success
  53. steps:
  54. # Test the vue theme
  55. - name: push commit
  56. image: appleboy/drone-git-push
  57. settings:
  58. branch: master
  59. remote: maeda@143.110.234.41:opt/vue-wp.git
  60. force: true
  61. ssh_key:
  62. from_secret: infra_key
  63. volumes:
  64. - name: node_cache
  65. host:
  66. path: /tmp/cache/drone/node_modules
  67. - name: build
  68. host:
  69. path: /tmp/cache/drone/build