Skip to content

Commit

Permalink
Fix: build and deploy docs. (opensearch-project#575)
Browse files Browse the repository at this point in the history
* Fix: build and deploy docs.

Signed-off-by: dblock <dblock@amazon.com>

* Run nox -rs generate.

Signed-off-by: dblock <dblock@amazon.com>

---------

Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: roma2023 <romasaparhan19@gmail.com>
  • Loading branch information
dblock authored and roma2023 committed Dec 28, 2023
1 parent 39da24e commit 12f9db5
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 37 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,3 @@ jobs:
- name: Check with Twine
working-directory: dist
run: twine check *

test-docs-build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Check if Sphinx docs are built
run: |
pip install -e .[docs]
cd docs
make html
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
name: Build & Deploy Doc
on:
push:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
name: Build & Deploy Docs
on: [push, pull_request, workflow_dispatch]

jobs:
build-and-deploy:
Expand All @@ -15,19 +10,17 @@ jobs:
with:
python-version: 3.7

- name: Install
- name: Install Dependencies
run: |
python -m pip install -U pip
pip install --progress-bar off -U .[docs]
python3.7 -m pip install nox
- name: Make
run: |
cd docs
make html
cd ..
nox -rs docs
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Removed
- Removed leftover support for Python 2.7 ([#548](https://github.com/opensearch-project/opensearch-py/pull/548))
### Fixed
- Fixed automatically built and deployed docs ([575](https://github.com/opensearch-project/opensearch-py/pull/575))
### Security
### Dependencies
- Bumps `sphinx` from <7.1 to <7.3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ OpenSearch Python Client
- [License](https://github.com/opensearch-project/opensearch-py#license)
- [Copyright](https://github.com/opensearch-project/opensearch-py#copyright)

## Welcome!
# Welcome!

**opensearch-py** is [a community-driven, open source fork](https://aws.amazon.com/blogs/opensource/introducing-opensearch/)
of elasticsearch-py licensed under the [Apache v2.0 License](https://github.com/opensearch-project/opensearch-py/blob/main/LICENSE.txt).
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXOPTS ?= -W
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
Expand Down
2 changes: 1 addition & 1 deletion opensearchpy/_async/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ async def index(
:arg if_seq_no: only perform the operation if the last operation
that has changed the document has the specified sequence number.
:arg op_type: Explicit operation type. Defaults to `index` for
requests with an explicit document ID, and to `create`for requests
requests with an explicit document ID, and to `create` for requests
without an explicit document ID. Valid choices are index, create.
:arg pipeline: The pipeline id to preprocess incoming documents
with.
Expand Down
2 changes: 1 addition & 1 deletion opensearchpy/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def index(
:arg if_seq_no: only perform the operation if the last operation
that has changed the document has the specified sequence number.
:arg op_type: Explicit operation type. Defaults to `index` for
requests with an explicit document ID, and to `create`for requests
requests with an explicit document ID, and to `create` for requests
without an explicit document ID. Valid choices are index, create.
:arg pipeline: The pipeline id to preprocess incoming documents
with.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
tests_require=tests_require,
extras_require={
"develop": tests_require + docs_require + generate_require,
"docs": docs_require,
"docs": docs_require + async_require,
"async": async_require,
"kerberos": ["requests_kerberos"],
},
Expand Down

0 comments on commit 12f9db5

Please sign in to comment.