From b3afe5929fa323eeedd0033e3f135db688017a55 Mon Sep 17 00:00:00 2001 From: Snorre Date: Tue, 1 Apr 2025 12:57:10 +0200 Subject: [PATCH] added actions --- .forgejo/main.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .forgejo/main.yml diff --git a/.forgejo/main.yml b/.forgejo/main.yml new file mode 100644 index 0000000..89ebfa5 --- /dev/null +++ b/.forgejo/main.yml @@ -0,0 +1,23 @@ +name: Restart Website Service + +on: + push: + branches: + - main # Change this to the branch you want to trigger the action on + +jobs: + restart_service: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Restart website service + env: + SSH_PRIVATE_KEY: ${{ secrets.WEBSITE_KEY }} # Store your private key in secrets + run: | + echo "$SSH_PRIVATE_KEY" > private_key + chmod 600 private_key + ssh -i private_key website-host-user@spoodythe.one -t 'systemctl restart website.service' +