44 push :
55 paths :
66 - pyproject.toml
7+ - uv.lock
78 - mlflow/**
89 - docs/**
910 - .github/workflows/docs.yml
1718 - ready_for_review
1819 paths :
1920 - pyproject.toml
21+ - uv.lock
2022 - mlflow/**
2123 - docs/**
2224 - .github/workflows/docs.yml
@@ -61,17 +63,33 @@ jobs:
6163 - uses : ./.github/actions/setup-java
6264 - uses : ./.github/actions/setup-node
6365 - uses : ./.github/actions/setup-python
64- - run : |
65- uv pip install --system -r ../requirements/doc-requirements.txt '..[gateway]' pytest
66+ - name : Install dependencies
67+ working-directory : .
68+ run : |
69+ uv sync --group docs --extra gateway
6670 - run : |
6771 npm ci
6872 - uses : ./.github/actions/show-versions
6973 - run : |
7074 npm run convert-notebooks
75+ - name : Set alias
76+ id : alias
77+ env :
78+ EVENT_NAME : ${{ github.event_name }}
79+ PR_NUMBER : ${{ github.event.pull_request.number }}
80+ run : |
81+ if [ "$EVENT_NAME" = "push" ]; then
82+ ALIAS="dev"
83+ else
84+ ALIAS="pr-$PR_NUMBER"
85+ fi
86+ echo "value=$ALIAS" >> $GITHUB_OUTPUT
87+ echo "$ALIAS" > /tmp/alias.txt
88+ cat /tmp/alias.txt
7189 - name : Build docs
7290 env :
7391 GTM_ID : " GTM-TEST"
74- API_REFERENCE_PREFIX : https://pr- ${{ github.event.pull_request.number }}--mlflow-docs-preview.netlify.app/docs/
92+ API_REFERENCE_PREFIX : https://${{ steps.alias.outputs.value }}--mlflow-docs-preview.netlify.app/docs/
7593 run : |
7694 npm run build-all -- --no-r --use-npm
7795 - name : Check API inventory
@@ -105,17 +123,6 @@ jobs:
105123
106124 # `github.event.workflow_run.pull_requests` is empty when a PR is created from a fork:
107125 # https://github.com/orgs/community/discussions/25220#discussioncomment-11001085
108- - name : Save alias
109- env :
110- EVENT_NAME : ${{ github.event_name }}
111- PR_NUMBER : ${{ github.event.pull_request.number }}
112- run : |
113- if [ "$EVENT_NAME" = "push" ]; then
114- echo "dev" > /tmp/alias.txt
115- else
116- echo "pr-$PR_NUMBER" > /tmp/alias.txt
117- fi
118- cat /tmp/alias.txt
119126 - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
120127 with :
121128 name : alias
@@ -136,14 +143,15 @@ jobs:
136143 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
137144 - uses : ./.github/actions/setup-python
138145 - name : Install dependencies
146+ working-directory : .
139147 run : |
140- uv pip install --system -r ../../requirements/doc-requirements.txt '../..[ gateway]' pytest
148+ uv sync --group docs --extra gateway
141149 - name : Extract examples
142150 run : |
143- python source/testcode_block.py
151+ uv run source/testcode_block.py
144152 - name : Run tests
145153 run : |
146- pytest .examples
154+ uv run pytest .examples
147155
148156 r :
149157 if : github.event_name != 'pull_request' || github.event.pull_request.draft == false
0 commit comments