Skip to content

Commit c7e2df6

Browse files
committed
Update deploy script to include service worker
1 parent d348d81 commit c7e2df6

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.env.example

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
DEPLOY_HOST="[email protected]"
2+
DEPLOY_PATH="/var/www/mylist/html"

bin/deploy

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
#
44
# $ ls *.{html,ico,png,xml,svg,webmanifest} >> bin/deploy
55

6-
[[ -f .env ]] && source .env
6+
MYLIST_DIR="$(dirname "$(dirname "$(readlink -f "$0")")")"
7+
if [ -f "${MYLIST_DIR}/.env" ]; then
8+
set -o allexport
9+
source "${MYLIST_DIR}/.env"
10+
set +o allexport
11+
fi
712

813
if [ -z "$DEPLOY_HOST" -o -z "$DEPLOY_PATH" ]; then
914
echo 1>&2 "ERROR: deploy host or path not set"
@@ -20,11 +25,12 @@ scp -r \
2025
favicon-32x32.png \
2126
favicon.ico \
2227
index.html \
28+
sw.js \
2329
mstile-144x144.png \
2430
mstile-150x150.png \
2531
mstile-310x150.png \
2632
mstile-310x310.png \
2733
mstile-70x70.png \
2834
safari-pinned-tab.svg \
2935
site.webmanifest \
30-
$DEPLOY_HOST:"$DEPLOY_PATH"
36+
"$DEPLOY_HOST":"$DEPLOY_PATH"

0 commit comments

Comments
 (0)