update actions
This commit is contained in:
46
.github/workflows/deploy.yml
vendored
46
.github/workflows/deploy.yml
vendored
@@ -5,45 +5,41 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- name: debian
|
||||||
|
build_command: build
|
||||||
|
remote_port: 22
|
||||||
|
target: /root/OJDeploy/data/clientnext
|
||||||
|
- name: school
|
||||||
|
build_command: build:staging
|
||||||
|
remote_port: 8822
|
||||||
|
target: /root/OJ/data/dist
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 24
|
||||||
cache: npm
|
cache: npm
|
||||||
- run: npm install
|
- run: npm ci
|
||||||
- run: CI=false npm run build
|
- run: npm run ${{ matrix.build_command }}
|
||||||
|
env:
|
||||||
|
CI: false
|
||||||
|
|
||||||
- uses: easingthemes/ssh-deploy@main
|
- uses: easingthemes/ssh-deploy@main
|
||||||
with:
|
with:
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.KEY }}
|
SSH_PRIVATE_KEY: ${{ secrets.KEY }}
|
||||||
REMOTE_HOST: ${{ secrets.HOST }}
|
REMOTE_HOST: ${{ secrets.HOST }}
|
||||||
|
REMOTE_PORT: ${{ matrix.remote_port }}
|
||||||
ARGS: "-avzr --delete"
|
ARGS: "-avzr --delete"
|
||||||
SOURCE: dist/
|
SOURCE: dist/
|
||||||
REMOTE_USER: root
|
REMOTE_USER: root
|
||||||
TARGET: /root/OJDeploy/data/clientnext
|
TARGET: ${{ matrix.target }}
|
||||||
|
|
||||||
# deploy-for-test:
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# - uses: actions/setup-node@v4
|
|
||||||
# with:
|
|
||||||
# node-version: 22
|
|
||||||
# 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
|
|
||||||
Reference in New Issue
Block a user