Merge pull request #8 from loloop/mc/vroom-app #23
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 | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: configure-ssh | |
run: | | |
mkdir -p ~/.ssh/ | |
echo "$key" > ~/.ssh/server.key | |
chmod 400 ~/.ssh/server.key | |
cat >>~/.ssh/config <<END | |
Host server | |
HostName $host | |
User $username | |
IdentityFile ~/.ssh/server.key | |
StrictHostKeyChecking no | |
END | |
- name: run-deploy-script | |
run: ssh server 'cd LandinhoBot; sh deploy.sh' | |
env: | |
host: ${{secrets.SSH_HOST}} | |
username: ${{secrets.SSH_USERNAME}} | |
key: ${{secrets.SSH_KEY}} |