Skip to content

Commit f410e81

Browse files
authored
Fix: build and deploy docs. (opensearch-project#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>
1 parent f1d0237 commit f410e81

File tree

8 files changed

+12
-37
lines changed

8 files changed

+12
-37
lines changed

.github/workflows/ci.yml

-19
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,3 @@ jobs:
5252
- name: Check with Twine
5353
working-directory: dist
5454
run: twine check *
55-
56-
test-docs-build:
57-
runs-on: ubuntu-latest
58-
steps:
59-
- name: Checkout Repository
60-
uses: actions/checkout@v3
61-
- name: Set up Python 3.7
62-
uses: actions/setup-python@v4
63-
with:
64-
python-version: 3.7
65-
- name: Install dependencies
66-
run: |
67-
python -m pip install --upgrade pip
68-
- name: Check if Sphinx docs are built
69-
run: |
70-
pip install -e .[docs]
71-
cd docs
72-
make html
73-
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
name: Build & Deploy Doc
2-
on:
3-
push:
4-
branches: [ main ]
5-
6-
# Allows you to run this workflow manually from the Actions tab
7-
workflow_dispatch:
1+
name: Build & Deploy Docs
2+
on: [push, pull_request, workflow_dispatch]
83

94
jobs:
105
build-and-deploy:
@@ -15,19 +10,17 @@ jobs:
1510
with:
1611
python-version: 3.7
1712

18-
- name: Install
13+
- name: Install Dependencies
1914
run: |
20-
python -m pip install -U pip
21-
pip install --progress-bar off -U .[docs]
15+
python3.7 -m pip install nox
2216
2317
- name: Make
2418
run: |
25-
cd docs
26-
make html
27-
cd ..
19+
nox -rs docs
2820
2921
- name: Deploy
3022
uses: peaceiris/actions-gh-pages@v3
23+
if: github.ref == 'refs/heads/main'
3124
with:
3225
github_token: ${{ secrets.GITHUB_TOKEN }}
3326
publish_dir: ./docs/build/html

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
3333
### Removed
3434
- Removed leftover support for Python 2.7 ([#548](https://github.com/opensearch-project/opensearch-py/pull/548))
3535
### Fixed
36+
- Fixed automatically built and deployed docs ([575](https://github.com/opensearch-project/opensearch-py/pull/575))
3637
### Security
3738
### Dependencies
3839
- Bumps `sphinx` from <7.1 to <7.3

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ OpenSearch Python Client
1818
- [License](https://github.com/opensearch-project/opensearch-py#license)
1919
- [Copyright](https://github.com/opensearch-project/opensearch-py#copyright)
2020

21-
## Welcome!
21+
# Welcome!
2222

2323
**opensearch-py** is [a community-driven, open source fork](https://aws.amazon.com/blogs/opensource/introducing-opensearch/)
2424
of elasticsearch-py licensed under the [Apache v2.0 License](https://github.com/opensearch-project/opensearch-py/blob/main/LICENSE.txt).

docs/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# You can set these variables from the command line, and also
55
# from the environment for the first two.
6-
SPHINXOPTS ?=
6+
SPHINXOPTS ?= -W
77
SPHINXBUILD ?= sphinx-build
88
SOURCEDIR = source
99
BUILDDIR = build

opensearchpy/_async/client/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ async def index(
373373
:arg if_seq_no: only perform the operation if the last operation
374374
that has changed the document has the specified sequence number.
375375
:arg op_type: Explicit operation type. Defaults to `index` for
376-
requests with an explicit document ID, and to `create`for requests
376+
requests with an explicit document ID, and to `create` for requests
377377
without an explicit document ID. Valid choices are index, create.
378378
:arg pipeline: The pipeline id to preprocess incoming documents
379379
with.

opensearchpy/client/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def index(
373373
:arg if_seq_no: only perform the operation if the last operation
374374
that has changed the document has the specified sequence number.
375375
:arg op_type: Explicit operation type. Defaults to `index` for
376-
requests with an explicit document ID, and to `create`for requests
376+
requests with an explicit document ID, and to `create` for requests
377377
without an explicit document ID. Valid choices are index, create.
378378
:arg pipeline: The pipeline id to preprocess incoming documents
379379
with.

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
tests_require=tests_require,
114114
extras_require={
115115
"develop": tests_require + docs_require + generate_require,
116-
"docs": docs_require,
116+
"docs": docs_require + async_require,
117117
"async": async_require,
118118
"kerberos": ["requests_kerberos"],
119119
},

0 commit comments

Comments
 (0)