image: node:18.13.0

pipelines:
  default:
    - step:
        name: Build and Deploy
        size: 2x
        caches:
          - node
        script:
          # Install dependencies
          - npm install

          # Run tests (if applicable)
          - npm test || true  # Make sure the pipeline continues even if tests fail

          # Build the Node.js app (if needed)
          # Comment this line if you don't have a build step
          # - npm run build

          # Deploy to remote server
          - scp -P 22334 -r * root@137.59.52.212:/var/www/api-academics
