kind: pipeline type: docker name: build steps: - name: build-backend image: public.ecr.aws/composer/composer:latest commands: - cd backend - composer install - composer dump-autoload --classmap-authoritative - composer dump-env prod - rm -rf var/cache - name: build-frontend image: public.ecr.aws/docker/library/node:16.13.1-alpine commands: - cd frontend - npm install - REACT_APP_GIT_SHA="${DRONE_COMMIT_SHA:0:10}" npm run build volumes: - name: cache path: /drone/src/frontend/node_modules - name: deploy-to-volume image: public.ecr.aws/docker/library/busybox:latest commands: - rm -rf /var/www-xrg.es/* - mv backend /var/www-xrg.es/backend - mv frontend/build /var/www-xrg.es/frontend node: location: hub