diff --git a/.github/workflows/python-update-docs.yml b/.github/workflows/python-update-docs.yml new file mode 100644 index 0000000..b2fbd3b --- /dev/null +++ b/.github/workflows/python-update-docs.yml @@ -0,0 +1,34 @@ +# This workflow will install Python dependencies, executes generate_style_list script and update docs during workkflow +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Update docs + +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + docs: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.8] + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install --upgrade --upgrade-strategy eager --no-cache-dir .[docs] + - name: execute script + run: | + python ./docs/source/generate_style_list.py + - uses: EndBug/add-and-commit@v8 + with: + default_author: github_actions + message: 'docs: update style list' diff --git a/docs/source/generate_style_list.py b/docs/source/generate_style_list.py index 6f258ce..0d1d59d 100644 --- a/docs/source/generate_style_list.py +++ b/docs/source/generate_style_list.py @@ -1,4 +1,5 @@ import os +__import__("sys").path.append(os.path.join(os.path.dirname(__file__), "..", "..")) from table2ascii import PresetStyle, table2ascii