diff options
Diffstat (limited to 'deploy-static')
| -rwxr-xr-x | deploy-static | 23 |
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 |
