variables: EXPORT_DIR: "/var/www/html/pages" stages: - deploy pages-master: stage: deploy script: - mkdir -p "$EXPORT_DIR/$CI_PROJECT_NAME" - ls -al "$EXPORT_DIR/$CI_PROJECT_NAME" - rm -rf "$EXPORT_DIR/$CI_PROJECT_NAME/.*" - ls -al "$EXPORT_DIR/$CI_PROJECT_NAME" - cp -r public/* "$EXPORT_DIR/$CI_PROJECT_NAME" - ls -al "$EXPORT_DIR/$CI_PROJECT_NAME" tags: - production only: - master