diff --git a/.github/actions/deploy-api-reference/action.yml b/.github/actions/deploy-api-reference/action.yml index b96652cf1..d47d85120 100644 --- a/.github/actions/deploy-api-reference/action.yml +++ b/.github/actions/deploy-api-reference/action.yml @@ -21,6 +21,8 @@ runs: ./scripts/generate-api-reference.sh "${{ inputs.ragstack-version }}" mv dist/api_reference /tmp/api_reference git checkout gh-pages + ls -la /tmp/api_reference/${{ inputs.ragstack-version }}/langchain + mkdir -p api_reference/${{ inputs.ragstack-version }} mv /tmp/api_reference/${{ inputs.ragstack-version }}/langchain api_reference/${{ inputs.ragstack-version }}/langchain if [ -z "$(git status --porcelain)" ]; then echo "Git directory is clean, nothing changed" @@ -30,4 +32,4 @@ runs: git add -A git commit -m "Update api reference" git pull --rebase origin gh-pages - git push origin gh-pages \ No newline at end of file + git push origin gh-pages diff --git a/scripts/generate-api-reference.sh b/scripts/generate-api-reference.sh index 3113bb5b2..5d19d013b 100755 --- a/scripts/generate-api-reference.sh +++ b/scripts/generate-api-reference.sh @@ -17,6 +17,12 @@ clone_lc() { git clone https://github.com/langchain-ai/langchain.git --branch v${langchain_version} --depth 1 /tmp/lc } install_requirements() { + # remove experimental up 0.0.350 + sed -i '' '/-e libs\/experimental/d' docs/api_reference/requirements.txt || sed -i '/-e libs\/experimental/d' docs/api_reference/requirements.txt + cat docs/api_reference/requirements.txt + sed -i '' '/_build_rst_file(package_name="experimental")/d' docs/api_reference/create_api_rst.py || sed -i '/_build_rst_file(package_name="experimental")/d' docs/api_reference/create_api_rst.py + # remove experimental 0.0.351 onwards + rm -rf libs/experimental poetry run pip install -r docs/api_reference/requirements.txt } build_docs() {