forked from dptech-corp/dflow
-
Notifications
You must be signed in to change notification settings - Fork 26
51 lines (45 loc) · 1.44 KB
/
ci-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
name: Build docs
on:
push:
branches:
- master
jobs:
build-n-push:
if: github.repository_owner == 'deepmodeling'
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Sphinx apidoc
run: |
python -m pip install sphinx jsonpickle typeguard
cd docs
sphinx-apidoc -o ./source ../src && make html
cd ..
- name: Commit documentation changes
run: |
git clone https://github.com/deepmodeling/dflow.git --branch docs --single-branch dflow-docs
cp -r docs/build/html/* dflow-docs
cd dflow-docs
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git diff-index --quiet HEAD || git commit -m "Update documentation"
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: docs
directory: dflow-docs
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: send email
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.feishu.cn
server_port: 465
username: ${{ secrets.MAILUSERNAME }}
password: ${{ secrets.MAILPASSWORD }}
subject: Documentation Auto Build For Dflow
body: Docs has been published to https://deepmodeling.com/dflow/
to: ${{ secrets.MAIL_RECEIVER_LIST }}
from: Github Actions
content_type: text