image: php:8.1

pipelines:
  default:
    - step:
        name: Deploy to Remote Server
        script:
          - apt-get update && apt-get install -y rsync ssh
          # Sync files to the server using rsync

          # Deploy to VSOFTAI server
          - echo "Starting deployment to VSOFTAI server..."
          - rsync -avz --exclude='node_modules' --exclude='.git' . $login_vsoftai@$host_vsoftai:$path_vsoftai
          - echo "Deployment to VSOFTAI server completed."


          # Deploy to 8Rabbits server
          - echo "Starting deployment to 8Rabbits server..."
          - rsync -avz --exclude='node_modules' --exclude='.git' . $login_8rabbits@$host_8rabbits:$path_8rabbits
          - echo "Deployment to 8Rabbits server completed."

          # Deploy to TAMKOAI server
          - echo "Starting deployment to TAMKOAI server..."
          - rsync -avz --exclude='node_modules' --exclude='.git' . $login_tamkoai_b@$host_tamkoai_b:$path_tamkoai_b
          - echo "Deployment to TAMKOAI server completed."
