29 lines
582 B
YAML
29 lines
582 B
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: "npm"
|
|
- run: npm install
|
|
- run: npm run build
|
|
|
|
- uses: easingthemes/ssh-deploy@main
|
|
with:
|
|
SSH_PRIVATE_KEY: ${{ secrets.KEY }}
|
|
REMOTE_HOST: ${{ secrets.HOST }}
|
|
ARGS: "-avzr --delete"
|
|
SOURCE: .vitepress/dist/
|
|
REMOTE_USER: root
|
|
TARGET: /root/Book/dist
|