From 60ed443385362da5aec98910a0ff20cc7706aa36 Mon Sep 17 00:00:00 2001 From: Timothy Cronin Date: Mon, 16 Sep 2024 19:01:18 -0400 Subject: [PATCH] add README generation --- .github/workflows/update_readme.yml | 31 +++++++++++++++++++++++++++++ docs/conf.py | 4 ++-- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/update_readme.yml diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml new file mode 100644 index 0000000..964fce9 --- /dev/null +++ b/.github/workflows/update_readme.yml @@ -0,0 +1,31 @@ +name: Update ReadMe + +on: + push: + branches: [ "main" ] + +permissions: + contents: write + +jobs: + create-release: + name: update-readme + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '>=3.11' + - run: | + python -m pip install sphinx + python -m pip install . + python -m run readme + if git diff --exit-code README.rst > /dev/null; then + echo "No changes in README" + else + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + git add README.rst + git commit -m "generate new README" + git push + fi diff --git a/docs/conf.py b/docs/conf.py index 8d01473..ca8a264 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -56,10 +56,10 @@ def run(self): .. |custom| replace:: custom .. _custom_cmake: {repo_src + '/cmake/custom.cmake'} .. |custom_cmake| replace:: *custom.cmake* -.. _doc: {docs} -.. |doc| replace:: **Documentation** .. _model_zoo: {repo_main + '/model_zoo/models.py'} .. |model_zoo| replace:: *model_zoo* +.. _doc: {docs} +.. |doc| replace:: **Documentation** .. |name| replace:: *{ai3.__name__}* .. |pkg_name| replace:: *{pkg_name}* '''