Fix: build and deploy docs. (#575)

* 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>
This commit is contained in:
Daniel (dB.) Doubrovkine
2023-11-11 17:28:43 -05:00
committed by GitHub
parent f1d02376e4
commit f410e81d80
8 changed files with 12 additions and 37 deletions
-19
View File
@@ -52,22 +52,3 @@ jobs:
- name: Check with Twine - name: Check with Twine
working-directory: dist working-directory: dist
run: twine check * 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
@@ -1,10 +1,5 @@
name: Build & Deploy Doc name: Build & Deploy Docs
on: on: [push, pull_request, workflow_dispatch]
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs: jobs:
build-and-deploy: build-and-deploy:
@@ -15,19 +10,17 @@ jobs:
with: with:
python-version: 3.7 python-version: 3.7
- name: Install - name: Install Dependencies
run: | run: |
python -m pip install -U pip python3.7 -m pip install nox
pip install --progress-bar off -U .[docs]
- name: Make - name: Make
run: | run: |
cd docs nox -rs docs
make html
cd ..
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html publish_dir: ./docs/build/html
+1
View File
@@ -33,6 +33,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Removed ### Removed
- Removed leftover support for Python 2.7 ([#548](https://github.com/opensearch-project/opensearch-py/pull/548)) - Removed leftover support for Python 2.7 ([#548](https://github.com/opensearch-project/opensearch-py/pull/548))
### Fixed ### Fixed
- Fixed automatically built and deployed docs ([575](https://github.com/opensearch-project/opensearch-py/pull/575))
### Security ### Security
### Dependencies ### Dependencies
- Bumps `sphinx` from <7.1 to <7.3 - Bumps `sphinx` from <7.1 to <7.3
+1 -1
View File
@@ -18,7 +18,7 @@ OpenSearch Python Client
- [License](https://github.com/opensearch-project/opensearch-py#license) - [License](https://github.com/opensearch-project/opensearch-py#license)
- [Copyright](https://github.com/opensearch-project/opensearch-py#copyright) - [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/) **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). of elasticsearch-py licensed under the [Apache v2.0 License](https://github.com/opensearch-project/opensearch-py/blob/main/LICENSE.txt).
+1 -1
View File
@@ -3,7 +3,7 @@
# You can set these variables from the command line, and also # You can set these variables from the command line, and also
# from the environment for the first two. # from the environment for the first two.
SPHINXOPTS ?= SPHINXOPTS ?= -W
SPHINXBUILD ?= sphinx-build SPHINXBUILD ?= sphinx-build
SOURCEDIR = source SOURCEDIR = source
BUILDDIR = build BUILDDIR = build
+1 -1
View File
@@ -373,7 +373,7 @@ class AsyncOpenSearch(Client):
:arg if_seq_no: only perform the operation if the last operation :arg if_seq_no: only perform the operation if the last operation
that has changed the document has the specified sequence number. that has changed the document has the specified sequence number.
:arg op_type: Explicit operation type. Defaults to `index` for :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. without an explicit document ID. Valid choices are index, create.
:arg pipeline: The pipeline id to preprocess incoming documents :arg pipeline: The pipeline id to preprocess incoming documents
with. with.
+1 -1
View File
@@ -373,7 +373,7 @@ class OpenSearch(Client):
:arg if_seq_no: only perform the operation if the last operation :arg if_seq_no: only perform the operation if the last operation
that has changed the document has the specified sequence number. that has changed the document has the specified sequence number.
:arg op_type: Explicit operation type. Defaults to `index` for :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. without an explicit document ID. Valid choices are index, create.
:arg pipeline: The pipeline id to preprocess incoming documents :arg pipeline: The pipeline id to preprocess incoming documents
with. with.
+1 -1
View File
@@ -113,7 +113,7 @@ setup(
tests_require=tests_require, tests_require=tests_require,
extras_require={ extras_require={
"develop": tests_require + docs_require + generate_require, "develop": tests_require + docs_require + generate_require,
"docs": docs_require, "docs": docs_require + async_require,
"async": async_require, "async": async_require,
"kerberos": ["requests_kerberos"], "kerberos": ["requests_kerberos"],
}, },