mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
ci(docs): resolve matching docs branch for validation
This commit is contained in:
parent
c42c2792d8
commit
0306dec958
2 changed files with 42 additions and 2 deletions
22
.github/workflows/test-code-quality.yml
vendored
22
.github/workflows/test-code-quality.yml
vendored
|
|
@ -25,10 +25,30 @@ jobs:
|
|||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Resolve litellm-docs checkout source
|
||||
id: docs_source
|
||||
env:
|
||||
DOCS_FORK_REPO: ${{ github.event.pull_request.head.repo.owner.login }}/litellm-docs
|
||||
DOCS_FORK_BRANCH: ${{ github.head_ref }}
|
||||
run: |
|
||||
DOCS_REPOSITORY="BerriAI/litellm-docs"
|
||||
DOCS_REF="main"
|
||||
|
||||
if git ls-remote --exit-code --heads \
|
||||
"https://github.com/${DOCS_FORK_REPO}.git" \
|
||||
"refs/heads/${DOCS_FORK_BRANCH}" >/dev/null 2>&1; then
|
||||
DOCS_REPOSITORY="${DOCS_FORK_REPO}"
|
||||
DOCS_REF="${DOCS_FORK_BRANCH}"
|
||||
fi
|
||||
|
||||
echo "repository=${DOCS_REPOSITORY}" >> "${GITHUB_OUTPUT}"
|
||||
echo "ref=${DOCS_REF}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Checkout litellm-docs into docs/my-website (for documentation_tests)
|
||||
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||
with:
|
||||
repository: BerriAI/litellm-docs
|
||||
repository: ${{ steps.docs_source.outputs.repository }}
|
||||
ref: ${{ steps.docs_source.outputs.ref }}
|
||||
path: docs/my-website
|
||||
persist-credentials: false
|
||||
|
||||
|
|
|
|||
22
.github/workflows/test-unit-documentation.yml
vendored
22
.github/workflows/test-unit-documentation.yml
vendored
|
|
@ -25,10 +25,30 @@ jobs:
|
|||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Resolve litellm-docs checkout source
|
||||
id: docs_source
|
||||
env:
|
||||
DOCS_FORK_REPO: ${{ github.event.pull_request.head.repo.owner.login }}/litellm-docs
|
||||
DOCS_FORK_BRANCH: ${{ github.head_ref }}
|
||||
run: |
|
||||
DOCS_REPOSITORY="BerriAI/litellm-docs"
|
||||
DOCS_REF="main"
|
||||
|
||||
if git ls-remote --exit-code --heads \
|
||||
"https://github.com/${DOCS_FORK_REPO}.git" \
|
||||
"refs/heads/${DOCS_FORK_BRANCH}" >/dev/null 2>&1; then
|
||||
DOCS_REPOSITORY="${DOCS_FORK_REPO}"
|
||||
DOCS_REF="${DOCS_FORK_BRANCH}"
|
||||
fi
|
||||
|
||||
echo "repository=${DOCS_REPOSITORY}" >> "${GITHUB_OUTPUT}"
|
||||
echo "ref=${DOCS_REF}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Checkout litellm-docs into docs/my-website (for documentation_tests)
|
||||
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||
with:
|
||||
repository: BerriAI/litellm-docs
|
||||
repository: ${{ steps.docs_source.outputs.repository }}
|
||||
ref: ${{ steps.docs_source.outputs.ref }}
|
||||
path: docs/my-website
|
||||
persist-credentials: false
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue