Enable doc upload for tags, disable for release branches#3153
Enable doc upload for tags, disable for release branches#3153
Conversation
- Disabled doc upload for branches like release/x.x
- Enabled publishing for tags.
Tested locally:
```
export GITHUB_REF=refs/tags/v3.1.4-rc5
```
bash test-version.py
```
# test-version.py
if [[ "${GITHUB_REF}" =~ ^refs/tags/v([0-9]+\.[0-9]+)\.* ]]; then
TARGET_FOLDER="${BASH_REMATCH[1]}"
else
TARGET_FOLDER="main"
fi
echo "Target folder: ${TARGET_FOLDER}"
```
Output:
```
Target folder: 3.1
```
One more:
```
export GITHUB_REF=refs/tags/v1.15.4
bash test-version.sh
```
Output:
```
Target folder: 1.15
```
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/3153
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 5ce8f01 with merge base 2c467dd ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Co-authored-by: Dave Bort <dbort@users.noreply.github.com>
dbort
left a comment
There was a problem hiding this comment.
Thanks, that's much simpler.
Please import this into a phabricator diff to run internal testing so we can land it
Co-authored-by: Dave Bort <dbort@users.noreply.github.com>
|
@svekars has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
@svekars has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
@svekars has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
@pytorchbot cherry-pick --onto release/0.2 -c docs |
Cherry picking #3153The cherry pick PR is at #3243 Details for Dev Infra teamRaised by workflow job |
Summary:
- Disabled doc upload for branches like release/x.x
- Enabled publishing for tags.
Tested locally:
```
export GITHUB_REF=refs/tags/v3.1.4-rc5
bash test-version.py
```
```
# test-version.py
if [[ "${GITHUB_REF}" =~ ^refs/tags/v([0-9]+\.[0-9]+)\.* ]]; then
TARGET_FOLDER="${BASH_REMATCH[1]}"
else
TARGET_FOLDER="main"
fi
echo "Target folder: ${TARGET_FOLDER}"
```
Output:
```
Target folder: 3.1
```
One more:
```
export GITHUB_REF=refs/tags/v1.15.4
bash test-version.sh
```
Output:
```
Target folder: 1.15
```
Pull Request resolved: #3153
Reviewed By: dbort
Differential Revision: D56445037
Pulled By: svekars
fbshipit-source-id: e7328523dfe308e8921c1e4f365d9a757d053191
(cherry picked from commit ee8c3a6)
Summary:
- Disabled doc upload for branches like release/x.x
- Enabled publishing for tags.
Tested locally:
```
export GITHUB_REF=refs/tags/v3.1.4-rc5
bash test-version.py
```
```
# test-version.py
if [[ "${GITHUB_REF}" =~ ^refs/tags/v([0-9]+\.[0-9]+)\.* ]]; then
TARGET_FOLDER="${BASH_REMATCH[1]}"
else
TARGET_FOLDER="main"
fi
echo "Target folder: ${TARGET_FOLDER}"
```
Output:
```
Target folder: 3.1
```
One more:
```
export GITHUB_REF=refs/tags/v1.15.4
bash test-version.sh
```
Output:
```
Target folder: 1.15
```
Pull Request resolved: #3153
Reviewed By: dbort
Differential Revision: D56445037
Pulled By: svekars
fbshipit-source-id: e7328523dfe308e8921c1e4f365d9a757d053191
(cherry picked from commit ee8c3a6)
Co-authored-by: Svetlana Karslioglu <svekars@meta.com>
Tested locally:
Output:
One more:
Output: