File tree Expand file tree Collapse file tree 1 file changed +3
-36
lines changed
Expand file tree Collapse file tree 1 file changed +3
-36
lines changed Original file line number Diff line number Diff line change 8282
8383 upload-gh-pages :
8484 needs : build
85- if : github.repository == 'pytorch/executorch' && github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
86- permissions :
87- id-token : write
88- contents : write
89- uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
85+ uses : pytorch/test-infra/.github/workflows/_upload_docs.yml@main
9086 with :
87+ docs-branch : gh-pages
88+ docs-name : docs
9189 repository : pytorch/executorch
92- download-artifact : docs
93- ref : gh-pages
94- timeout : 90
95- script : |
96- set -euo pipefail
97-
98- # Get github.ref for the output doc folder. By default "main"
99- # If matches a tag like refs/tags/v1.12.0-rc3 or
100- # refs/tags/v1.12.0 convert to 1.12
101- export GITHUB_REF=${{ github.ref }}
102-
103- # Convert refs/tags/v1.12.0rc3 into 1.12.
104- # Adopted from https://github.com/pytorch/pytorch/blob/main/.github/workflows/_docs.yml#L150C11-L155C13
105- if [[ "${GITHUB_REF}" =~ ^refs/tags/v([0-9]+\.[0-9]+) ]]; then
106- TARGET_FOLDER="${BASH_REMATCH[1]}"
107- else
108- TARGET_FOLDER="main"
109- fi
110- echo "Target Folder: ${TARGET_FOLDER}"
111-
112- mkdir -p "${TARGET_FOLDER}"
113- # Clean up target folder if exists and copy html output to the
114- # Target folder
115- rm -rf "${TARGET_FOLDER}"/*
116- mv "${RUNNER_ARTIFACT_DIR}"/html/* "${TARGET_FOLDER}"
117- git add "${TARGET_FOLDER}" || true
118-
119- git config user.name 'pytorchbot'
120- git config user.email '[email protected] ' 121- git commit -m "Auto-generating sphinx docs" || true
122- git push -f
You can’t perform that action at this time.
0 commit comments