Skip to content

action for automatic restart #1

action for automatic restart

action for automatic restart #1

Workflow file for this run

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

View workflow run for this annotation

GitHub Actions / Restart Monitor

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 12, Col: 14): Unrecognized named-value: 'HOSTNAME'. Located at position 1 within expression: HOSTNAME .github/workflows/main.yml (Line: 20, Col: 14): Unrecognized named-value: 'HOSTNAME'. Located at position 1 within expression: HOSTNAME
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