Skip to content

Commit

Permalink
Update the upload job (#3385)
Browse files Browse the repository at this point in the history
Summary:
The current regex doesn't match as needed, but the corrected one does. Also exporting the GITHUB_REF variable just in case.

Pull Request resolved: #3385

Reviewed By: dbort

Differential Revision: D56659290

Pulled By: svekars

fbshipit-source-id: 19672df509656958e355d2a88c506cfe056649fd
(cherry picked from commit 9314595)
  • Loading branch information
svekars authored and dbort committed Apr 27, 2024
1 parent 4f79832 commit 6a1703e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ jobs:
# Get github.ref for the output doc folder. By default "main"
# If matches a tag like refs/tags/v1.12.0-rc3 or
# refs/tags/v1.12.0 convert to 1.12
GITHUB_REF=${{ github.ref }}
export GITHUB_REF=${{ github.ref }}
# Convert refs/tags/v1.12.0rc3 into 1.12.
# Adopted from https://github.com/pytorch/pytorch/blob/main/.github/workflows/_docs.yml#L150C11-L155C13
if [[ "${GITHUB_REF}" =~ ^refs/tags/v([0-9]+\\.[0-9]+)\\. ]]; then
if [[ "${GITHUB_REF}" =~ ^refs/tags/v([0-9]+\.[0-9]+) ]]; then
TARGET_FOLDER="${BASH_REMATCH[1]}"
else
TARGET_FOLDER="main"
Expand Down

0 comments on commit 6a1703e

Please sign in to comment.