Fix deploy: inline eepsite sync instead of excluded script
All checks were successful
Deploy krustyplanet.org / deploy (push) Successful in 8s
All checks were successful
Deploy krustyplanet.org / deploy (push) Successful in 8s
This commit is contained in:
parent
9d52df4bbf
commit
a37d89d340
1 changed files with 29 additions and 3 deletions
|
|
@ -32,8 +32,34 @@ jobs:
|
|||
--exclude '.forgejo' \
|
||||
--exclude 'terraform' \
|
||||
--exclude 'research' \
|
||||
--exclude 'scripts' \
|
||||
./ root@5.161.214.55:/var/www/krustyplanet/
|
||||
|
||||
- name: Sync eepsite
|
||||
run: ssh root@5.161.214.55 'cd /var/www/krustyplanet && bash scripts/sync-eepsite.sh'
|
||||
- name: Sync eepsite from clearnet
|
||||
run: |
|
||||
ssh root@5.161.214.55 bash -s << 'SCRIPT'
|
||||
set -euo pipefail
|
||||
|
||||
CLEARNET="/var/www/krustyplanet"
|
||||
EEPSITE="/var/www/eepsite"
|
||||
|
||||
# Sync shared static assets
|
||||
rsync -av --delete "$CLEARNET/css/" "$EEPSITE/css/"
|
||||
rsync -av --delete "$CLEARNET/js/" "$EEPSITE/js/"
|
||||
cp "$CLEARNET/favicon.svg" "$EEPSITE/favicon.svg"
|
||||
|
||||
# Shared pages to sync
|
||||
SHARED_PAGES=("index.html" "services.html" "pricing.html" "contact.html")
|
||||
|
||||
for page in "${SHARED_PAGES[@]}"; do
|
||||
cp "$CLEARNET/$page" "$EEPSITE/$page"
|
||||
|
||||
# Replace I2P mirror link with clearnet reference
|
||||
sed -i 's|🔒 I2P Mirror:.*b32\.i2p</a></p>|🌐 Clearnet: <a href="https://krustyplanet.org" style="color:#b5b5b5;">https://krustyplanet.org</a></p>|' "$EEPSITE/$page"
|
||||
|
||||
# Remove nav links to clearnet-only pages
|
||||
sed -i '/href="\/free-audit\.html"/d' "$EEPSITE/$page"
|
||||
sed -i '/href="\/blog\.html"/d' "$EEPSITE/$page"
|
||||
done
|
||||
|
||||
echo "Eepsite synced."
|
||||
SCRIPT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue