Skip to content

Commit 4aa2db1

Browse files
committed
staging
1 parent df57904 commit 4aa2db1

File tree

6 files changed

+63
-66
lines changed

6 files changed

+63
-66
lines changed

deploy-static

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,20 @@ fi
1414

1515
. servers.sh
1616

17-
remote=root@nyc.grapheneos.org
17+
remote=root@staging.grapheneos.org
1818

19-
rsync -pcv --chmod=F644 --fsync --preallocate mirrors $remote:/etc/mirrors
20-
21-
# use last modified timestamps from nyc.grapheneos.org
22-
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate $remote:/srv/grapheneos.org/ static-production
23-
rsync -pcv --chmod=D755,F644 --fsync --preallocate static-production/sitemap.xml{,.gz,.br} static-tmp/
24-
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-production
25-
for f in static-production/**.*(br|gz); do
19+
# use last modified timestamps from staging.grapheneos.org
20+
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate $remote:/srv/grapheneos.org/ static-staging
21+
rsync -pcv --chmod=D755,F644 --fsync --preallocate static-staging/sitemap.xml{,.gz,.br} static-tmp/
22+
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-staging
23+
for f in static-staging/**.*(br|gz); do
2624
touch -r "${f%.*}" "$f"
2725
done
2826
changed="$(./generate-sitemap)"
2927
xmllint --noblanks static-tmp/sitemap.xml --output static-tmp/sitemap.xml
3028
brotli -f static-tmp/sitemap.xml
3129
zopfli static-tmp/sitemap.xml
32-
rsync -pcv --chmod=D755,F644 --fsync --preallocate static-tmp/sitemap.xml{,.gz,.br} static-production/
30+
rsync -pcv --chmod=D755,F644 --fsync --preallocate static-tmp/sitemap.xml{,.gz,.br} static-staging/
3331

3432
for server in ${servers[@]}; do
3533
echo $server
@@ -48,7 +46,7 @@ for server in ${servers[@]}; do
4846
echo
4947

5048
ssh $remote "rm -rf $target && cp -a $active $target"
51-
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate static-production/ $remote:$target
49+
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate static-staging/ $remote:$target
5250
ssh $remote "ln -snf $target /srv/grapheneos.org && sync /srv/grapheneos.org"
5351

5452
echo "root $target;" > nginx-tmp/root_grapheneos.org.conf
@@ -59,7 +57,3 @@ for server in ${servers[@]}; do
5957
echo active is now $target
6058
echo
6159
done
62-
63-
if [[ -n "$changed" ]]; then
64-
./indexnow <<< "$changed"
65-
fi

generate-sitemap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ from datetime import datetime, timezone
44
from os.path import getmtime
55
from pathlib import Path
66

7-
base = "https://grapheneos.org"
7+
base = "https://staging.grapheneos.org"
88

99
pages = [
1010
["/", 0.5],
@@ -42,7 +42,7 @@ entries = []
4242
for page in pages:
4343
path = page[0]
4444
loc = base + path
45-
filepath = "static-production" + path
45+
filepath = "static-staging" + path
4646
if path[-1] == '/':
4747
filepath += "index.html"
4848
elif "." not in path:

0 commit comments

Comments
 (0)