--- ################ # Build & Test # ################ kind: pipeline name: run_tests steps: # Test the vue theme - name: test image: node commands: - pwd - cd ./vue-theme - npm install - npm test volumes: # Link node_modules cache from host filesystem into container at the expected location - name: node_cache path: /drone/src/vue-theme/node_modules - name: build image: node commands: - cd ./vue-theme - rm -Rf ./build/* - npm run build - ls ./build volumes: # Link node_modules cache from host filesystem into container at the expected location - name: node_cache path: /drone/src/vue-theme/node_modules - name: build path: /drone/src/vue-theme/build volumes: - name: node_cache host: path: /tmp/cache/drone/node_modules - name: build host: path: /tmp/cache/drone/build --- ######################## # Deploy to Production # ######################## kind: pipeline name: deploy depends_on: # Must run after the first pipeline - run_tests trigger: status: # Only runs if the first pipeline was fully successful - success steps: # Test the vue theme - name: push commit image: appleboy/drone-git-push settings: branch: master remote: maeda@143.110.234.41:opt/vue-wp.git force: true ssh_key: from_secret: infra_key volumes: - name: node_cache host: path: /tmp/cache/drone/node_modules - name: build host: path: /tmp/cache/drone/build