website/.forgejo/workflows/restart_service.yml
Snorre 6437c84039
All checks were successful
Restart Website Service / restart_service (push) Successful in 0s
fixed action
2025-04-01 15:35:03 +02:00

20 lines
484 B
YAML

name: Restart Website Service
on:
push:
branches:
- main
jobs:
restart_service:
runs-on: native
steps:
- name: Restart website service
env:
SSH_PRIVATE_KEY: ${{ secrets.WEBSITE_KEY }}
run: |
echo "$SSH_PRIVATE_KEY" > /tmp/private_key
chmod 600 /tmp/private_key
ssh -i /tmp/private_key -o StrictHostKeyChecking=no website-host-user@spoodythe.one -t 'sudo systemctl restart rebuild-website.service'