Skip to content

Commit 9575bea

Browse files
committed
staging commit
1 parent 1f2d2d1 commit 9575bea

File tree

3 files changed

+39
-8
lines changed

3 files changed

+39
-8
lines changed

.github/workflows/development.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,41 @@ jobs:
6868
--count --max-complexity=62 --max-line-length=127 --statistics
6969
black datajoint --check -v
7070
black tests --check -v
71+
publish-docs:
72+
if: |
73+
github.event_name == 'push' &&
74+
(
75+
github.repository_owner == 'datajoint' ||
76+
github.repository_owner == 'datajoint-company' ||
77+
github.repository_owner == 'dj-sciops'
78+
)
79+
needs: build-docs
80+
runs-on: ubuntu-latest
81+
steps:
82+
- uses: actions/checkout@v2
83+
- name: Fetch docs static artifacts
84+
uses: actions/download-artifact@v2
85+
with:
86+
name: docs-api-static
87+
path: docs-api/build/html
88+
- name: Commit documentation changes
89+
run: |
90+
git clone https://github.com/${GITHUB_REPOSITORY}.git \
91+
--branch gh-pages --single-branch gh-pages
92+
rm -R gh-pages/*
93+
cp -r docs-api/build/html/* gh-pages/
94+
cp .gitignore gh-pages/
95+
touch gh-pages/.nojekyll
96+
cd gh-pages
97+
git config --local user.email "[email protected]"
98+
git config --local user.name "GitHub Action"
99+
git add . --all
100+
git commit -m "Update documentation" -a || true
101+
# The above command will fail if no changes were present, so we ignore
102+
# the return code.
103+
- name: Push changes
104+
uses: ad-m/github-push-action@master
105+
with:
106+
branch: gh-pages
107+
directory: gh-pages
108+
github_token: ${{secrets.GITHUB_TOKEN}}

docs-api/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Welcome to DataJoint's API Documentation!
1010
:maxdepth: 2
1111
:caption: Contents:
1212

13-
modules
13+
datajoint
1414

1515

1616

docs-api/source/modules.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)