This commit is contained in:
2026-01-14 23:29:28 +08:00
parent 36c32feb01
commit c1e5b48038

View File

@@ -5,47 +5,41 @@ on:
branches: branches:
- main - main
permissions:
contents: read
jobs: jobs:
deploy-debian: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: debian
build_command: build
remote_host: ${{ secrets.HOST }}
remote_port: 22
- name: school
build_command: build:staging
remote_host: ${{ secrets.HOST }}
remote_port: 8822
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 24 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
env: env:
SSH_PRIVATE_KEY: ${{ secrets.KEY }} SSH_PRIVATE_KEY: ${{ secrets.KEY }}
REMOTE_HOST: ${{ secrets.HOST }} REMOTE_HOST: ${{ matrix.remote_host }}
REMOTE_PORT: ${{ matrix.remote_port }}
ARGS: "-avzr --delete" ARGS: "-avzr --delete"
SOURCE: dist/ SOURCE: dist/
REMOTE_USER: root REMOTE_USER: root
TARGET: /root/Home/build TARGET: /root/Home/build
deploy-school:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: 24
cache: 'npm'
- run: npm install
- run: CI=false npm run build:staging
- uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.KEY }}
REMOTE_HOST: ${{ secrets.HOST }}
REMOTE_PORT: 8822
ARGS: "-avzr --delete"
SOURCE: dist/
REMOTE_USER: root
TARGET: /root/Home/build