mirror of
https://github.com/iflytek/skillhub.git
synced 2026-10-10 03:27:54 +00:00
fix(deploy): upload HK runtime release files
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
This commit is contained in:
parent
735f6fb1f0
commit
288bd91be7
1 changed files with 16 additions and 0 deletions
|
|
@ -119,6 +119,22 @@ ssh_opts=(
|
|||
-p "${ssh_port}"
|
||||
)
|
||||
|
||||
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
runtime_files=(
|
||||
"compose.release.yml"
|
||||
".env.release.example"
|
||||
)
|
||||
|
||||
for runtime_file in "${runtime_files[@]}"; do
|
||||
[[ -f "${repo_root}/${runtime_file}" ]] || {
|
||||
echo "Missing local runtime file for HK deployment: ${runtime_file}" >&2
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
|
||||
tar -C "${repo_root}" -cf - "${runtime_files[@]}" | ssh "${ssh_opts[@]}" "${ssh_user}@${ssh_host}" \
|
||||
'set -euo pipefail; runtime_dir="/opt/skillhub-runtime"; mkdir -p "${runtime_dir}"; tar -xf - -C "${runtime_dir}"'
|
||||
|
||||
ssh "${ssh_opts[@]}" "${ssh_user}@${ssh_host}" bash -s -- \
|
||||
"${deploy_tag}" \
|
||||
"${immutable_tag}" \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue