Merge pull request #73 from vitessio/cross-platform-find #66
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 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
if: ${{ github.repository_owner == 'vitessio' }} | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21.5 | |
- name: executing remote ssh commands using password | |
uses: fifsky/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
key: ${{ secrets.KEY }} | |
user: ${{ secrets.USERNAME }} | |
port: ${{ secrets.PORT }} | |
args: "-tt" | |
command: | | |
cd $HOME/vitess-bot | |
git reset --hard FETCH_HEAD | |
git clean -fd | |
git fetch origin main | |
git checkout FETCH_HEAD | |
killall -9 vitess-bot | |
source ~/.profile | |
go build -o vitess-bot ./go | |
nohup ./vitess-bot & |