Files
g365sfu/.gitea/workflows/build.yaml
set 8c386eb42a
All checks were successful
Build G365SFU / build (push) Successful in 13m19s
Фикс Go версии
2026-03-20 20:25:35 +02:00

45 lines
1.2 KiB
YAML

name: Build G365SFU
run-name: Build and Deploy G365SFU
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.24
- name: Build G365SFU
run: |
make build
- name: Deploy to server via SSH
uses: appleboy/scp-action@v1
with:
host: ${{ secrets.SFU_SSH_HOST }}
username: ${{ secrets.SFU_SSH_USER }}
password: ${{ secrets.SFU_SSH_PASSWORD }}
port: ${{ secrets.SFU_SSH_PORT }}
source: "build/*"
target: ${{ secrets.SFU_DEPLOY_PATH }}
strip_components: 1
rm: false
debug: true
flatten: true
- name: Restart Docker containers
uses: appleboy/ssh-action@v1.2.5
with:
host: ${{ secrets.SFU_SSH_HOST }}
username: ${{ secrets.SFU_SSH_USER }}
password: ${{ secrets.SFU_SSH_PASSWORD }}
port: ${{ secrets.SFU_SSH_PORT }}
script: |
cd ${{ secrets.SFU_DEPLOY_PATH }}
docker-compose down
docker compose up -d --build