-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploy documentation via github actions.
- Loading branch information
1 parent
78fc1c2
commit 2d44e52
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: deploy documentation | ||
|
||
on: | ||
push: | ||
branches: [ develop, master ] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: setup | ||
uses: actions/setup-python@v2 | ||
- name: prerequisites | ||
run: | | ||
sudo apt-get install graphviz libgraphviz-dev | ||
python -m pip install --upgrade pip | ||
python -m pip install sphinx sphinx-argparse pygraphviz | ||
- name: build | ||
run: | | ||
PYTHONPATH=`pwd`/src python -m faber.cli --srcdir=doc --builddir=build | ||
if [ "${BRANCH_NAME}" == develop ]; then | ||
destination_dir=doc/develop/html | ||
else | ||
destination_dir=doc/html | ||
fi | ||
- name: deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: build/html | ||
destination_dir: ${{ env.destination_dir }} | ||
keep_files: true |