-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (26 loc) · 986 Bytes
/
deploy-backend-go.yml
File metadata and controls
32 lines (26 loc) · 986 Bytes
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
name: Build and Deploy Go Backend
on:
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker images
run: |
cd backend-go
docker build -t ftoolbox-backend:latest .
docker save ftoolbox-backend:latest > image.tar
- name: Transfer files to root server
uses: Burnett01/rsync-deployments@7.0.2
with:
switches: -avzr --delete
path: backend-go/image.tar backend-go/docker-compose.prod.yml backend-go/load_containers.sh
remote_path: ${{ secrets.SERVER_PATH }}
remote_host: ${{ secrets.SERVER_HOST }}
remote_user: ${{ secrets.SERVER_USERNAME }}
remote_key: ${{ secrets.SSH_PRIVATE_KEY }}
remote_port: ${{ secrets.SERVER_PORT }}
remote_key_pass: ${{ secrets.SSH_KEY_PASSPHRASE }}