-
Notifications
You must be signed in to change notification settings - Fork 90
71 lines (63 loc) · 2.1 KB
/
deploy.yaml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Publish docs via GitHub Pages
on:
push:
branches:
- v3.4.5
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1 # fetch all commits/branches
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: '3.8'
architecture: 'x64'
- name : prepare
run: sh ./prepare.sh
- name: Git Config
run: git config user.name whitewum && git config user.email min.wu@vesoft.com
- name: mike
run: |
git fetch origin gh-pages --depth=1 # fix mike's CI update
mike deploy 3.4.5 -p --rebase
mike list
- name: show git branch
run: |
git branch
git checkout .
git checkout gh-pages
- name: Compress
run: |
tar -vczf nebula-docs.tar.gz 3.4.5 versions.json *.html
- name: Transfer
# uses: garygrossgarten/github-action-scp@release
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER_NAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
source: nebula-docs.tar.gz
target: /usr/web
- name: UnCompress
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER_NAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: |
mkdir -p /usr/web/nebula-docs/
tar -xzf /usr/web/nebula-docs.tar.gz -C /usr/web/nebula-docs/
mkdir -p /usr/web/nebula-docs/site/pdf/
cp -f /usr/web/nebula-docs/3.4.5/pdf/NebulaGraph-CN.pdf /usr/web/nebula-docs/site/pdf/NebulaGraph-book.pdf
# pip3 install --upgrade pip
# pip3 install -r /usr/web/nebula-docs/requirement.txt
# - name: Deploy
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.DEPLOY_TOKEN }}
# publish_dir: ./site