Система CI/CD
Some checks failed
Build G365SFU / build (push) Has been cancelled

This commit is contained in:
set
2026-03-20 19:24:03 +02:00
parent 6364253c6f
commit 625a7acfb7
6 changed files with 105 additions and 2 deletions

View File

@@ -0,0 +1,39 @@
name: Build G365SFU
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install Node.js
run: |
if command -v apt-get &> /dev/null; then
sudo apt-get update && sudo apt-get install -y nodejs npm
elif command -v brew &> /dev/null; then
brew install node
fi
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20
- 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