NEXT craftinamerica.org. Base setup for headless wordpress https://www.craftinamerica.org
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

.drone.yml 1.7KB

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