diff options
| author | Daniel Micay <daniel.micay@grapheneos.org> | 2024-05-15 01:52:10 -0400 |
|---|---|---|
| committer | Daniel Micay <daniel.micay@grapheneos.org> | 2024-05-15 04:15:35 -0400 |
| commit | 94068c3cffa74cf99906e53bb7cef018baa94b19 (patch) | |
| tree | 22aca4e55c2b5eb0a1bd8b77f8b9a0ad2b38fd20 /deploy-static | |
| parent | 5ed267e8df70f3ea929a9b5487de4f26b7c27f6b (diff) | |
generate sitemap as part of deployment
This allows adding the lastmod field based on the last modification date
of the file.
Diffstat (limited to 'deploy-static')
| -rwxr-xr-x | deploy-static | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/deploy-static b/deploy-static index 9d45560c..64086281 100755 --- a/deploy-static +++ b/deploy-static @@ -19,10 +19,16 @@ rsync -pcv --chmod=F644 --fsync --preallocate replicate.conf root@${servers[0]}: # 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 touch -r "${f%.*}" "$f" done +./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/ for server in ${servers[@]}; do echo $server |
