From b2f3c80aee70ac6f4d81ad93bb6bc48accd71e97 Mon Sep 17 00:00:00 2001 From: tim Date: Sat, 12 Jul 2025 22:50:15 +0800 Subject: [PATCH] feat: add deploy --- .github/workflows/deploy.yml | 37 ++++++++++++++++++++++++++++++++++++ open-isle-cli/src/main.js | 4 ++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..fe03a0f29 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 + diff --git a/open-isle-cli/src/main.js b/open-isle-cli/src/main.js index e1483ea4c..d8599009b 100644 --- a/open-isle-cli/src/main.js +++ b/open-isle-cli/src/main.js @@ -12,8 +12,8 @@ import { initTheme } from './utils/theme' // export const API_DOMAIN = 'http://127.0.0.1' // export const API_PORT = 8081 -// export const API_DOMAIN = 'http://129.204.254.110' -// export const API_PORT = 8080 +export const API_DOMAIN = 'http://129.204.254.110' +export const API_PORT = 8080 // export const API_BASE_URL = API_PORT ? `${API_DOMAIN}:${API_PORT}` : API_DOMAIN export const API_BASE_URL = "";