ci: use docker compose for deployment
All checks were successful
/ Build (push) Successful in 1m33s

This commit is contained in:
log101 2024-05-31 22:43:46 +03:00
parent 5375827820
commit f346241e5c

View File

@ -6,23 +6,6 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22.3"
- name: Install dependencies
run: go get .
- name: Build
run: go build
- name: Transfer files
env:
USERNAME: ${{ secrets.USERNAME }}
HOST: ${{ secrets.HOST }}
SSH_KEY: ${{ secrets.KEY }}
run: |
echo $HOST
scp -o StrictHostKeyChecking=no -r log101-blog-services $USERNAME@$HOST:/home/$USERNAME
- name: Rebuild docker compose
uses: appleboy/ssh-action@v1.0.3
with:
@ -30,4 +13,6 @@ jobs:
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
ls
cd /home/log101/prod/log101.dev-services
git pull
docker compose up -d --build