Update testing #6
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: Deploy to Server | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup SSH Keys and known_hosts | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
run: | | |
mkdir -p ~/.ssh/ | |
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 | |
# bit paranoid, but prevent cracking the pubkey | |
echo "${{ secrets.SSH_PUBLIC_KEY }}" > ~/.ssh/id_ed25519.pub | |
chmod 600 ~/.ssh/id_ed25519 | |
chmod 644 ~/.ssh/id_ed25519.pub | |
ssh-keyscan -H wii-linux.org > ~/.ssh/known_hosts | |
- name: Git pull on server | |
run: ssh root@wii-linux.org 'cd /srv/www/wii-linux.org; git pull' |