Skip to content

Merge pull request #878 from deepmodeling/release-please--branches--m… #870

Merge pull request #878 from deepmodeling/release-please--branches--m…

Merge pull request #878 from deepmodeling/release-please--branches--m… #870

Workflow file for this run

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