I run mina -S deploy get deploy script, It contains:
#!/usr/bin/env bash
# Bail out ASAP
set -e
....
# Determine $previous_path and other variables
[ -h "current" ] && [ -d "current" ] && previous_path=$(cd "current" >/dev/null && pwd -LP)
build_path="./tmp/build-`date +%s`$RANDOM"
version=$((`cat "/var/www/project/last_version" 2>/dev/null`+1))
release_path="releases/$version"
...
When getting last version with cat, it failed and exit because of last_version file is missing.
mina setup should create last_version file with 0, or deploy script check file exist or not.
At last, I create this file myself to work around this issue.