diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/deploy-test.yml deleted file mode 100644 index 96372d4..0000000 --- a/.github/workflows/deploy-test.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3c81e8a..d03ae07 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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