diff --git a/attendance/index.html b/attendance/index.html new file mode 100644 index 0000000..b5e1d5c --- /dev/null +++ b/attendance/index.html @@ -0,0 +1,58 @@ + + + + + + Attendance + + + +
+
Attendance Sheet
+
+ +
+
+ + diff --git a/attendance/submit/index.html b/attendance/submit/index.html new file mode 100644 index 0000000..94e3779 --- /dev/null +++ b/attendance/submit/index.html @@ -0,0 +1,58 @@ + + + + + + Submit Attendance + + + +
+
Submit Attendance
+
+ +
+
+ + diff --git a/deploy/deploy.sh b/deploy/deploy.sh index f1440e6..aa45c4b 100755 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -2,11 +2,8 @@ set -euo pipefail HOST="${1:-}" DEST="${2:-}" -TMP="/tmp/masha_site_$(date +%s)" -mkdir -p "$TMP" -cp -a index.html "$TMP/index.html" -ssh -o StrictHostKeyChecking=no "$HOST" "mkdir -p '$DEST'" -scp -q "$TMP/index.html" "$HOST":"$DEST/.index.html.new" -ssh -o StrictHostKeyChecking=no "$HOST" "mv '$DEST/.index.html.new' '$DEST/index.html'" -rm -rf "$TMP" +TMP="$DEST.new" +ssh -o StrictHostKeyChecking=no "$HOST" "rm -rf '$TMP' && mkdir -p '$TMP'" +tar -cz --exclude .git --exclude Jenkinsfile --exclude deploy -C . . | ssh -o StrictHostKeyChecking=no "$HOST" "tar -xz -C '$TMP'" +ssh -o StrictHostKeyChecking=no "$HOST" "mkdir -p '$DEST'; rm -rf '${DEST}.prev'; mv '$DEST' '${DEST}.prev' 2>/dev/null || true; mv '$TMP' '$DEST'"