NEXT craftinamerica.org. Base setup for headless wordpress https://www.craftinamerica.org
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.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. - cd ./vue-theme
  13. - npm install
  14. - npm test
  15. volumes:
  16. # Link node_modules cache from host filesystem into container at the expected location
  17. - name: node_cache
  18. path: ./vue-theme/node_modules
  19. - name: build
  20. image: node
  21. commands:
  22. - cd ./vue-theme
  23. - npm run build
  24. volumes:
  25. # Link node_modules cache from host filesystem into container at the expected location
  26. - name: node_cache
  27. path: ./vue-theme/node_modules
  28. volumes:
  29. - name: node_cache
  30. host:
  31. path: /tmp/cache/drone/node_modules
  32. ---
  33. ########################
  34. # Deploy to Production #
  35. ########################
  36. kind: pipeline
  37. name: deploy
  38. depends_on:
  39. # Must run after the first pipeline
  40. - run_tests
  41. trigger:
  42. status:
  43. # Only runs if the first pipeline was fully successful
  44. - success
  45. steps:
  46. # Test the vue theme
  47. - name: test
  48. image: node
  49. commands:
  50. - pwd
  51. - ls ./vue-theme/node_modules
  52. volumes:
  53. # Link node_modules cache from host filesystem into container at the expected location
  54. - name: node_cache
  55. path: ./vue-theme/node_modules
  56. volumes:
  57. - name: node_cache
  58. host:
  59. path: /tmp/cache/drone/node_modules