Skip to content

Commit

Permalink
Docs workflow auto detect module name (#24)
Browse files Browse the repository at this point in the history
* Docs workflow auto detect module name

* Gh pages instructions in readme
  • Loading branch information
nx10 authored Aug 7, 2023
1 parent a2ec5b9 commit 8573666
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
poetry install -E docs
- name: Build docs
run: |
poetry run pdoc src/APP_NAME -o docs_build -t docs/pdoc-theme --docformat google
APP_MODULE_NAME=$(ls src -U | head -1) # Get the first module name in the src directory
poetry run pdoc src/"$APP_MODULE_NAME" -o docs_build -t docs/pdoc-theme --docformat google
touch docs_build/.nojekyll
- uses: JamesIves/github-pages-deploy-action@v4
with:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This is a template repository. Below is a checklist of things you should do to u
- [ ] Update the name of `src/APP_NAME`
- [ ] Grant third-party app permissions (e.g. Codecov) [here](https://github.com/organizations/cmi-dair/settings/installations), if necessary.
- [ ] Either generate a `CODECOV_TOKEN` secret [here](https://github.com/cmi-dair/flowdump/blob/main/.github/workflows/python_tests.yaml) (if its a private repository) or remove the line `token: ${{ secrets.CODECOV_TOKEN }}`
- [ ] API docs website: After the first successful build, go to the `Settings` tab of your repository, scroll down to the `GitHub Pages` section, and select `gh-pages` as the source. This will generate a link to your API docs.

# Project name

Expand Down

0 comments on commit 8573666

Please sign in to comment.