NEXT craftinamerica.org. Base setup for headless wordpress https://www.craftinamerica.org
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. remote_name: staging
  61. force: true
  62. ssh_key:
  63. from_secret: push_deploy_key
  64. volumes:
  65. - name: node_cache
  66. host:
  67. path: /tmp/cache/drone/node_modules
  68. - name: build
  69. host:
  70. path: /tmp/cache/drone/build