This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
name: Deploy
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build Go binary
|
||||
run: |
|
||||
docker run --rm \
|
||||
-v ${{ github.workspace }}:/workspace \
|
||||
-w /workspace/api \
|
||||
golang:1.22.5 \
|
||||
sh -c 'go mod tidy && go build -o /workspace/api/bin/api cmd/main.go'
|
||||
|
||||
- name: Copy binary and restart service
|
||||
run: |
|
||||
cp api/bin/api /home/gaziz/artefacts/tp/main_dc/yalarba/api_yal/bin/api
|
||||
docker compose -f /home/gaziz/artefacts/tp/main_dc/docker-compose.yml restart api_yal
|
||||
+3
-1
@@ -34,4 +34,6 @@ coverage
|
||||
*.tsbuildinfo
|
||||
|
||||
# Binaries
|
||||
api/bin/
|
||||
api/bin/
|
||||
# AGENTS.md (contains secrets)
|
||||
AGENTS.md
|
||||
|
||||
Reference in New Issue
Block a user