.github/workflows/deploy.yml #3
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
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
deply: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Add SSH Key | |
run: | | |
install -m 600 -D /dev/null ~/.ssh/id_rsa | |
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa | |
ssh-keyscan -H -T 60 ouroboros.audio > ~/.ssh/known_hosts | |
- name: Fetch | |
run: ssh nik@$ouroboros.audio "sudo su && cd $HOME/compositions/traefik/www/ouroboros.audio/html/ && git checkout main && git pull && exit" | |
- name: Cleanup | |
run: rm -rf ~/.ssh |