This commit is contained in:
2024-07-03 11:19:28 +08:00
parent 019fc57773
commit 5f9deb5378
2 changed files with 22 additions and 29 deletions

View File

@@ -1,28 +0,0 @@
name: DeployTest
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- run: npm install
- run: CI=false NODE_ENV=development npm run build
- uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.KEY }}
REMOTE_HOST: ${{ secrets.HOST }}
ARGS: "-avzr --delete"
SOURCE: dist/
REMOTE_USER: root
TARGET: /root/ojtest/data/clientnext

View File

@@ -6,7 +6,7 @@ on:
- main
jobs:
build-and-deploy:
deploy-for-prod:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -26,3 +26,24 @@ jobs:
SOURCE: dist/
REMOTE_USER: root
TARGET: /root/OJDeploy/data/clientnext
deploy-for-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- run: npm install
- run: CI=false NODE_ENV=development npm run build
- uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.KEY }}
REMOTE_HOST: ${{ secrets.HOST }}
ARGS: "-avzr --delete"
SOURCE: dist/
REMOTE_USER: root
TARGET: /root/ojtest/data/clientnext