Add Forgejo Actions deploy workflow for clearnet + eepsite
Some checks failed
Deploy krustyplanet.org / deploy (push) Failing after 17s
Some checks failed
Deploy krustyplanet.org / deploy (push) Failing after 17s
This commit is contained in:
parent
053d67f19f
commit
9d52df4bbf
1 changed files with 39 additions and 0 deletions
39
.forgejo/workflows/deploy.yml
Normal file
39
.forgejo/workflows/deploy.yml
Normal file
|
|
@ -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'
|
||||||
Loading…
Add table
Add a link
Reference in a new issue