fix: forgejo deploy - please work
Some checks failed
Deploy Blog / deploy (push) Failing after 20s

This commit is contained in:
Thomas Bishop 2025-07-08 17:28:04 +01:00
parent 0c4ee2d462
commit e2f9bbd829

View file

@ -50,14 +50,11 @@ jobs:
container: node:18
steps:
- uses: actions/checkout@v3
- run: npm install
- run: npm run build:posts
- run: npm run build
- name: Deploy via SSH
- name: Create dummy file and deploy
run: |
echo "test content" > test.txt
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /tmp/ssh_key
chmod 600 /tmp/ssh_key
HOST_IP=$(ip route show default | awk '/default/ {print $3}')
ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no thomas@$HOST_IP "rm -rf /var/www/systemsobscure.blog/*"
scp -i /tmp/ssh_key -o StrictHostKeyChecking=no -r dist/* thomas@$HOST_IP:/var/www/systemsobscure.blog/
ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no thomas@172.17.0.1 "rm -rf /var/www/systemsobscure.blog/*"
scp -i /tmp/ssh_key -o StrictHostKeyChecking=no test.txt thomas@172.17.0.1:/var/www/systemsobscure.blog/
rm /tmp/ssh_key