github actions.
This commit is contained in:
28
.github/workflows/deploy.yaml
vendored
Normal file
28
.github/workflows/deploy.yaml
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
name: Deploy
|
||||||
|
|
||||||
|
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: npm run build
|
||||||
|
|
||||||
|
- uses: easingthemes/ssh-deploy@main
|
||||||
|
with:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.KEY }}
|
||||||
|
REMOTE_HOST: ${{ secrets.HOST }}
|
||||||
|
ARGS: "-avzr --delete"
|
||||||
|
SOURCE: docs/.vitepress/dist/
|
||||||
|
REMOTE_USER: root
|
||||||
|
TARGET: /root/NewBook/dist
|
||||||
Reference in New Issue
Block a user