Skip to content

Commit

Permalink
action for automatic restart
Browse files Browse the repository at this point in the history
  • Loading branch information
paolini committed Feb 22, 2024
1 parent d7d8b61 commit 7bb44ba
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Restart Monitor

on:
push:
branches:
- main
jobs:
production:
runs-on: ubuntu-latest
steps:
- name: Setup SSH
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa
echo "${{ secrets.SSH_PUB_KEY }}" > ~/.ssh/id_rsa.pub
chmod 600 ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa.pub
ssh-keyscan -H ${{ secrets.HOSTNAME }} >> ~/.ssh/known_hosts
- name: restart server
run: |
ssh radxa@${{ secrets.HOSTNAME }} ./start-schermo.sh

0 comments on commit 7bb44ba

Please sign in to comment.