feat: add deploy

This commit is contained in:
tim
2025-07-12 22:50:15 +08:00
parent c654928429
commit b2f3c80aee
2 changed files with 39 additions and 2 deletions

37
.github/workflows/deploy.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: CI & CD
on:
push:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- run: mvn -B clean package -DskipTests
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: |
cd open-isle-cli
npm ci
npm run build
- name: Deploy to Server
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SSH_HOST }}
username: root
key: ${{ secrets.SSH_KEY }}
script: bash /opt/openisle/deploy.sh