-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ca75d1
commit 3c4dbab
Showing
6 changed files
with
19 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ fi | |
rm -rf build | ||
./gradlew build | ||
|
||
[email protected] | ||
remote=root@staging.attestation.app | ||
path=/opt/attestation | ||
active=$(ssh $remote readlink $path/deploy) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,20 +12,20 @@ fi | |
|
||
./process-static $fd | ||
|
||
[email protected] | ||
remote=root@staging.attestation.app | ||
|
||
# use last modified timestamps from attestation.app | ||
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate $remote:/srv/attestation.app/ static-production | ||
rsync -pcv --chmod=D755,F644 --fsync --preallocate static-production/sitemap.xml{,.gz,.br} static-tmp/ | ||
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-production | ||
for f in static-production/**.*(br|gz); do | ||
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate $remote:/srv/attestation.app/ static-staging | ||
rsync -pcv --chmod=D755,F644 --fsync --preallocate static-staging/sitemap.xml{,.gz,.br} static-tmp/ | ||
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-staging | ||
for f in static-staging/**.*(br|gz); do | ||
touch -r "${f%.*}" "$f" | ||
done | ||
changed="$(./generate-sitemap)" | ||
xmllint --noblanks static-tmp/sitemap.xml --output static-tmp/sitemap.xml | ||
brotli -f static-tmp/sitemap.xml | ||
zopfli static-tmp/sitemap.xml | ||
rsync -pcv --chmod=D755,F644 --fsync --preallocate static-tmp/sitemap.xml{,.gz,.br} static-production/ | ||
rsync -pcv --chmod=D755,F644 --fsync --preallocate static-tmp/sitemap.xml{,.gz,.br} static-staging/ | ||
|
||
active=$(ssh $remote readlink /srv/attestation.app) | ||
|
||
|
@@ -40,7 +40,7 @@ echo target is $target | |
echo | ||
|
||
ssh $remote "rm -rf $target && cp -a $active $target" | ||
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-production/ $remote:$target | ||
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-staging/ $remote:$target | ||
ssh $remote "ln -snf $target /srv/attestation.app && sync /srv/attestation.app" | ||
|
||
echo "root $target;" > nginx-tmp/root_attestation.app.conf | ||
|
@@ -53,8 +53,3 @@ echo active is now $target | |
rsync -pcv --chmod=755 --fsync --preallocate remote-backup $remote:/usr/local/bin/ | ||
rsync -pcv --chmod=644 --fsync --preallocate systemd/system/remote-backup.timer $remote:/etc/systemd/system/remote-backup.timer | ||
rsync -pcv --chmod=644 --fsync --preallocate systemd/system/remote-backup.service $remote:/etc/systemd/system/remote-backup.service | ||
rsync -pcv --chmod=644 --chown attestation:attestation --fsync --preallocate backup-public-key.txt cloud-archive.sh $remote:/var/lib/attestation/ | ||
|
||
if [[ -n "$changed" ]]; then | ||
./indexnow <<< "$changed" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters