Ensure deployment is always in a usable state

Prior to this change, index.html was deployed before all episode media
files which could lead to the episode already being shown as available
while the media is still being uploaded.
Simon Bruder 2022-01-22 15:16:19 +01:00
parent 5052394ae4
commit f487979c55
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
1 changed files with 6 additions and 1 deletions

View File

@ -3,6 +3,10 @@ set -euo pipefail
target="$1"
function rsync_command() {
rsync -varzLP --delete "result-${target}/" "schabernack@yuzuru.sbruder.xyz:${directory}" "$@"
}
case "$target" in
"staging")
nix_package="schulischer-schabernack-staging"
@ -19,4 +23,5 @@ case "$target" in
esac
nix build -o "result-${target}" -L ".#${nix_package}"
rsync -varzLP --delete "result-${target}/" "schabernack@yuzuru.sbruder.xyz:${directory}"
rsync_command --include "episodes" --include "episodes/*" --exclude "*"
rsync_command