-
Notifications
You must be signed in to change notification settings - Fork 25
63 lines (53 loc) · 1.55 KB
/
deploy-docs.yml
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
name: Deploy Docs to GitHub Pages
on:
push:
branches:
- master
- docs_branch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs_requirements.txt
working-directory: ./docs
- name: Build and deploy docs
run: |
mkdocs build
working-directory: ./docs
- name: List current directory contents
run: |
ls -la
ls -la ./site
working-directory: ./docs
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.UPDATE_GH_PAGES }}
publish_dir: ./docs/site
# - name: Remove existing files on remote server
# uses: appleboy/ssh-action@master
# with:
# host: ${{ secrets.REMOTE_HOST }}
# username: ${{ secrets.REMOTE_USER }}
# key: ${{ secrets.SSH_PRIVATE_KEY }}
# port: ${{ secrets.REMOTE_PORT }}
# script: |
# rm -rf ${{ secrets.REMOTE_DEST_PATH }}/../../docs
- name: Deploy via scp
uses: appleboy/scp-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.REMOTE_PORT }}
source: "./docs/site"
target: ${{ secrets.REMOTE_DEST_PATH }}/../../