forked from goravel/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.11 KB
/
Copy pathdeploy.yml
File metadata and controls
51 lines (42 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Deploy
on:
workflow_dispatch:
concurrency:
group: deploy
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: true
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
- name: Build with VitePress
run: pnpm docs:build
- name: Push gh-pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .vitepress/dist
publish_branch: gh-pages
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
port: ${{ secrets.SERVER_PORT }}
allenvs: true
script: |
cd /data/wwwroot/www.goravel.dev/ && git pull origin gh-pages