fix
This commit is contained in:
50
.github/workflows/deploy.yml
vendored
50
.github/workflows/deploy.yml
vendored
@@ -5,46 +5,40 @@ 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 }}
|
||||||
ARGS: "-avzr --delete"
|
REMOTE_PORT: ${{ matrix.remote_port }}
|
||||||
SOURCE: dist/
|
|
||||||
REMOTE_USER: root
|
|
||||||
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"
|
ARGS: "-avzr --delete"
|
||||||
SOURCE: dist/
|
SOURCE: dist/
|
||||||
REMOTE_USER: root
|
REMOTE_USER: root
|
||||||
|
|||||||
Reference in New Issue
Block a user