summaryrefslogtreecommitdiff
path: root/deploy-static
diff options
context:
space:
mode:
authorDaniel Micay <daniel.micay@grapheneos.org>2023-07-26 12:12:29 -0400
committerDaniel Micay <daniel.micay@grapheneos.org>2025-06-20 20:05:11 -0400
commit1c70723a135db8cf52ff614ef5a4ac1bbb577d31 (patch)
tree878c318cfca949e93942f57abf3811a603fd9145 /deploy-static
parentdd97da343a52198a7cc1d591a0ad04e44142451b (diff)
stagingstaging
Diffstat (limited to 'deploy-static')
-rwxr-xr-xdeploy-static23
1 files changed, 8 insertions, 15 deletions
diff --git a/deploy-static b/deploy-static
index 6afdedad..55fbe086 100755
--- a/deploy-static
+++ b/deploy-static
@@ -12,23 +12,20 @@ fi
./process-static $fd
-servers=({0..3}.grapheneos.org)
+servers=(staging.grapheneos.org)
-rsync -pcv --chmod=F755 --fsync --preallocate certbot-replicate root@${servers[0]}:/usr/local/bin/
-rsync -pcv --chmod=F644 --fsync --preallocate replicate.conf root@${servers[0]}:/etc/systemd/system/certbot-renew.service.d/
-
-# use last modified timestamps from 0.grapheneos.org
-rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate root@${servers[0]}:/srv/grapheneos.org/ 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
+# use last modified timestamps from staging.grapheneos.org
+rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate root@${servers[0]}:/srv/grapheneos.org/ 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/
for server in ${servers[@]}; do
echo $server
@@ -47,7 +44,7 @@ for server in ${servers[@]}; do
echo
ssh $remote "rm -rf $target && cp -a $active $target"
- rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate static-production/ $remote:$target
+ rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate static-staging/ $remote:$target
ssh $remote "ln -snf $target /srv/grapheneos.org && sync /srv/grapheneos.org"
echo "root $target;" > nginx-tmp/root_grapheneos.org.conf
@@ -58,7 +55,3 @@ for server in ${servers[@]}; do
echo active is now $target
echo
done
-
-if [[ -n "$changed" ]]; then
- ./indexnow <<< "$changed"
-fi