version: 40 jobs: - name: Deploy app jobExecutor: Executer steps: - !CheckoutStep name: Checkout cloneCredential: !DefaultCredential {} withLfs: false withSubmodules: false condition: SUCCESSFUL optional: false - !CommandStep name: Copy repo runInContainer: false interpreter: !DefaultInterpreter commands: | rsync -av --delete --exclude="node_modules" --exclude="config/db.sql" --exclude=".env" ./ /www/wwwroot/moviebox/ useTTY: true condition: SUCCESSFUL optional: false - !CommandStep name: Install deps runInContainer: false interpreter: !DefaultInterpreter commands: | cd /www/wwwroot/moviebox npm install npx drizzle-kit migrate useTTY: true condition: SUCCESSFUL optional: false - !CommandStep name: Build App runInContainer: false interpreter: !DefaultInterpreter commands: | cd /www/wwwroot/moviebox npm run build useTTY: true condition: SUCCESSFUL optional: false - !CommandStep name: Start App runInContainer: false interpreter: !DefaultInterpreter commands: | cd /www/wwwroot/moviebox pm2 delete moviebox pm2 start "npm start -- -p 3010" --name moviebox useTTY: true condition: SUCCESSFUL optional: false triggers: - !BranchUpdateTrigger branches: main retryCondition: never maxRetries: 3 retryDelay: 30 timeout: 14400