added actions
This commit is contained in:
parent
f176b1f35c
commit
b3afe5929f
23
.forgejo/main.yml
Normal file
23
.forgejo/main.yml
Normal file
|
@ -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'
|
||||
|
Loading…
Reference in a new issue