mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-07-18 02:26:15 +00:00
feat: add deploy
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
@@ -12,8 +12,8 @@ import { initTheme } from './utils/theme'
|
|||||||
// export const API_DOMAIN = 'http://127.0.0.1'
|
// export const API_DOMAIN = 'http://127.0.0.1'
|
||||||
// export const API_PORT = 8081
|
// export const API_PORT = 8081
|
||||||
|
|
||||||
// export const API_DOMAIN = 'http://129.204.254.110'
|
export const API_DOMAIN = 'http://129.204.254.110'
|
||||||
// export const API_PORT = 8080
|
export const API_PORT = 8080
|
||||||
|
|
||||||
// export const API_BASE_URL = API_PORT ? `${API_DOMAIN}:${API_PORT}` : API_DOMAIN
|
// export const API_BASE_URL = API_PORT ? `${API_DOMAIN}:${API_PORT}` : API_DOMAIN
|
||||||
export const API_BASE_URL = "";
|
export const API_BASE_URL = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user