diff --git a/.circleci/config.yml b/.circleci/config.yml index da715e6..e701e81 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,6 +25,9 @@ jobs: - run: name: Build CSS and JavaScript command: npm run build + - run: + name: Generate timestamp + command: bash build/generate_timestamp.sh - run: name: Deploy theme command: bash build/deploy.sh diff --git a/build/deploy.sh b/build/deploy.sh old mode 100644 new mode 100755 index 0f55693..5cbcdfb --- a/build/deploy.sh +++ b/build/deploy.sh @@ -5,10 +5,6 @@ hash rsync 2>/dev/null || { echo >&2 "Error: rsync is not installed. Aborting."; [ -z "$SSH_IP" ] && { echo >&2 "Error: SSH_IP is missing. Aborting."; exit 1; } [ -z "$SSH_USER" ] && { echo >&2 "Error: SSH_USER is missing. Aborting."; exit 1; } -# Write deploy timestamp to disk -timestamp=$(date +%s) -echo $timestamp > ./theme/.timestamp - # Deploy theme with rsync rsync -e "ssh -o StrictHostKeyChecking=no" -avzuh --progress \ - theme/* $SSH_USER@$SSH_IP:~/windycoys_theme + theme/. $SSH_USER@$SSH_IP:~/windycoys_theme diff --git a/build/generate_timestamp.sh b/build/generate_timestamp.sh new file mode 100755 index 0000000..d0e530f --- /dev/null +++ b/build/generate_timestamp.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +# Write deploy timestamp to disk +timestamp=$(date +%s) +echo $timestamp > theme/.timestamp diff --git a/build/purge_cache.sh b/build/purge_cache.sh old mode 100644 new mode 100755