action for automatic restart #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Restart Monitor | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
production: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup SSH | ||
run: | | ||
Check failure on line 12 in .github/workflows/main.yml GitHub Actions / Restart MonitorInvalid workflow file
|
||
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 ${{ HOSTNAME }} >> ~/.ssh/known_hosts | ||
- name: restart server | ||
run: | | ||
ssh radxa@${{ HOSTNAME }} ./start-schermo.sh |