kind: pipeline type: docker name: build steps: - name: build-backend image: composer:latest commands: - cd backend - composer install - composer dump-autoload --classmap-authoritative - composer dump-env prod - rm -rf var/cache - name: build-frontend image: 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: busybox:latest commands: - rm -rf /var/www-xrg.es/* - mv backend /var/www-xrg.es/backend - mv frontend/build /var/www-xrg.es/frontend - chown -R 82:82 /var/www-xrg.es/backend/var node: location: nexus