From 9d52df4bbfc937c8adc59dfd51895827e555638e Mon Sep 17 00:00:00 2001 From: BarnacleBoy Date: Mon, 4 May 2026 20:17:53 +0000 Subject: [PATCH] Add Forgejo Actions deploy workflow for clearnet + eepsite --- .forgejo/workflows/deploy.yml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .forgejo/workflows/deploy.yml diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml new file mode 100644 index 0000000..86ff561 --- /dev/null +++ b/.forgejo/workflows/deploy.yml @@ -0,0 +1,39 @@ +name: Deploy krustyplanet.org +on: + push: + branches: [main] + +jobs: + deploy: + runs-on: ubuntu-latest + container: + image: node:22-bookworm + volumes: + - /home/agent/.ssh:/home/root/.ssh:ro + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install system dependencies + run: apt-get update && apt-get install -y rsync openssh-client + + - name: Setup SSH + run: | + mkdir -p ~/.ssh + cp /home/root/.ssh/id_ed25519 ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + chmod 700 ~/.ssh + echo "5.161.214.55 ssh-ed25519 $(ssh-keyscan -t ed25519 5.161.214.55 2>/dev/null | awk '{print $3}')" > ~/.ssh/known_hosts + + - name: Deploy to clearnet + run: | + rsync -avz --delete \ + --exclude '.git' \ + --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'