This commit is contained in:
39
.gitea/workflows/build.yaml
Normal file
39
.gitea/workflows/build.yaml
Normal 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
|
||||
Reference in New Issue
Block a user