forked from vitessio/arewefastyet
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 853 Bytes
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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.22.5
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
cd $HOME/arewefastyet
git reset --hard FETCH_HEAD
git clean -fd
git fetch origin main
git checkout FETCH_HEAD
docker compose -f docker-compose.prod.yml build
docker compose -f docker-compose.prod.yml up -d