deploy.sh 390 B

123456789101112131415
  1. #!/bin/bash
  2. pattern="tachiyomi-r*"
  3. files=( $pattern )
  4. export ARTIFACT="${files[0]}"
  5. if [ -z "$ARTIFACT" ]; then
  6. echo "Artifact not found"
  7. exit 1
  8. fi
  9. export SSHOPTIONS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${DEPLOY_KEY}"
  10. scp $SSHOPTIONS $ARTIFACT $DEPLOY_USER@$DEPLOY_HOST:builds/
  11. ssh $SSHOPTIONS $DEPLOY_USER@$DEPLOY_HOST ln -sf $ARTIFACT builds/latest