-
Notifications
You must be signed in to change notification settings - Fork 7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Specify test-infra branch to main (#8046)
- Loading branch information
Showing
5 changed files
with
43 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,14 +18,15 @@ jobs: | |
with: | ||
repository: pytorch/vision | ||
upload-artifact: docs | ||
test-infra-ref: main | ||
script: | | ||
set -euo pipefail | ||
export PYTHON_VERSION=3.8 | ||
export GPU_ARCH_TYPE=cpu | ||
export GPU_ARCH_VERSION='' | ||
./.github/scripts/setup-env.sh | ||
# Prepare conda | ||
CONDA_PATH=$(which conda) | ||
eval "$(${CONDA_PATH} shell.bash hook)" | ||
|
@@ -36,13 +37,13 @@ jobs: | |
# Should we maybe always do this in `./.github/scripts/setup-env.sh` so that we don't | ||
# have to pay attention in all other workflows? | ||
export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}" | ||
cd docs | ||
echo '::group::Install doc requirements' | ||
pip install --progress-bar=off -r requirements.txt | ||
echo '::endgroup::' | ||
if [[ ${{ github.event_name }} == push && (${{ github.ref_type }} == tag || (${{ github.ref_type }} == branch && ${{ github.ref_name }} == release/*)) ]]; then | ||
echo '::group::Enable version string sanitization' | ||
# This environment variable just has to exist and must not be empty. The actual value is arbitrary. | ||
|
@@ -66,9 +67,9 @@ jobs: | |
cp $file build/html/_generated_ipynb_notebooks/ | ||
fi | ||
done | ||
cp -r build/html "${RUNNER_ARTIFACT_DIR}" | ||
# On PRs we also want to upload the docs into our S3 bucket for preview. | ||
if [[ ${{ github.event_name == 'pull_request' }} ]]; then | ||
cp -r build/html/* "${RUNNER_DOCS_DIR}" | ||
|
@@ -85,9 +86,10 @@ jobs: | |
repository: pytorch/vision | ||
download-artifact: docs | ||
ref: gh-pages | ||
test-infra-ref: main | ||
script: | | ||
set -euo pipefail | ||
REF_TYPE=${{ github.ref_type }} | ||
REF_NAME=${{ github.ref_name }} | ||
|
@@ -112,14 +114,14 @@ jobs: | |
rm -rf "${TARGET_FOLDER}"/* | ||
mv "${RUNNER_ARTIFACT_DIR}"/html/* "${TARGET_FOLDER}" | ||
git add "${TARGET_FOLDER}" || true | ||
if [[ "${TARGET_FOLDER}" == main ]]; then | ||
mkdir -p _static | ||
rm -rf _static/* | ||
cp -r "${TARGET_FOLDER}"/_static/* _static | ||
git add _static || true | ||
fi | ||
git config user.name 'pytorchbot' | ||
git config user.email '[email protected]' | ||
git config http.postBuffer 524288000 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters