Skip to content

Merge pull request #84 from vitessio/pin-github-actions-to-shas #73

Merge pull request #84 from vitessio/pin-github-actions-to-shas

Merge pull request #84 from vitessio/pin-github-actions-to-shas #73

Workflow file for this run

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@7b8cf10d4e4a01d4992d18a89f4d7dc5a3e6d6f4 # v4.3.0
with:
go-version: 1.21.5
- name: executing remote ssh commands using password
uses: fifsky/ssh-action@5a841de87115730aff750ac127773e3b2b3f56dd # 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 &