Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project. (`make clean`)
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly. (`make html`)
- [ ] I have incremented the version number in the `pyproject.toml` file.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed. (`make tests`)
56 changes: 56 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build and Deploy Docs
on:
push:
branches: [ "main" ]
paths:
- 'doc_source/**'
- 'src/ect/**'

jobs:
docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version-file: "pyproject.toml"
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y pandoc

- name: Create venv and install dependencies
run: |
uv venv
source .venv/bin/activate
uv pip install -e .
uv pip install sphinx sphinx-rtd-theme nbsphinx autopep8 myst-parser

- name: Build documentation
run: |
source .venv/bin/activate
make html

- name: Configure Git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'

- name: Commit and push if changed
run: |
if [[ -n "$(git status --porcelain docs/)" ]]; then
git add docs/
git commit -m "docs: auto-generate documentation"
git push origin HEAD:main
else
echo "No changes to commit"
fi
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@ release:
python setup.py sdist bdist_wheel

html:
# Running sphinx-build to build html files in build folder.
rm -r docs
# Running sphinx-build to build html files in docs folder
rm -rf docs
mkdir docs
sphinx-build -M html doc_source docs
rsync -a docs/html/ docs/
rm -r docs/html
sphinx-build -b html doc_source docs

benchmark:
python benchmarks/run_benchmarks.py
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "ect"
version = "1.0.0"
version = "1.0.1"
authors = [
{ name="Liz Munch", email="muncheli@msu.edu" },
]
Expand Down