From 2bdf4c761b75da5a4f2ea0a291df512fda6ef0b8 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Mon, 8 May 2023 22:42:53 +0200 Subject: [PATCH 1/3] remove double doc upload after path unification --- .github/workflows/linux_job.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/linux_job.yml b/.github/workflows/linux_job.yml index 5da23f5c3b..1bc2147147 100644 --- a/.github/workflows/linux_job.yml +++ b/.github/workflows/linux_job.yml @@ -214,17 +214,6 @@ jobs: path: ${{ runner.temp }}/artifacts/ if-no-files-found: ${{ steps.check-artifacts.outputs.if-no-files-found }} - # TODO: Remove once we converge on documentation paths - - name: (legacy) Upload documentation to S3 (if any) - uses: seemethere/upload-artifact-s3@v5 - if: ${{ steps.check-artifacts.outputs.upload-docs == 1 && github.event.pull_request.number != '' }} - with: - retention-days: 14 - s3-bucket: doc-previews - if-no-files-found: error - path: ${{ env.RUNNER_DOCS_DIR }} - s3-prefix: pytorch/${{ env.REPOSITORY }}/${{ github.event.pull_request.number }} - - name: Upload documentation to S3 (if any) uses: seemethere/upload-artifact-s3@v5 if: ${{ steps.check-artifacts.outputs.upload-docs == 1 && github.event.pull_request.number != '' }} @@ -233,7 +222,7 @@ jobs: s3-bucket: doc-previews if-no-files-found: error path: ${{ env.RUNNER_DOCS_DIR }} - s3-prefix: ${{ env.REPOSITORY }}/${{ github.event.pull_request.number }} + s3-prefix: pytorch/${{ env.REPOSITORY }}/${{ github.event.pull_request.number }} - name: Teardown Linux if: ${{ always() }} From 99af4e77b7d532be7b07656e6f1a167ecf3c30a2 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Mon, 8 May 2023 23:42:36 +0200 Subject: [PATCH 2/3] fix test --- .github/workflows/test_linux_job.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test_linux_job.yml b/.github/workflows/test_linux_job.yml index dd0cf1d622..dfb8d9edc9 100644 --- a/.github/workflows/test_linux_job.yml +++ b/.github/workflows/test_linux_job.yml @@ -119,9 +119,8 @@ jobs: script: | # Sleep a couple of seconds just in case S3 is being slow (might not be needed?) sleep 10 - # TODO: Change this eventually to reflect new url path, see https://github.com/pytorch/test-infra/issues/3894 REPO_NAME="$(echo "${GITHUB_REPOSITORY}" | cut -d '/' -f2)" - curl -fsSL "https://docs-preview.pytorch.org/${REPO_NAME}/${PR_NUMBER}/index.html" | grep "hello" + curl -fsSL "https://docs-preview.pytorch.org/pytorch/${REPO_NAME}/${PR_NUMBER}/index.html" | grep "hello" test-with-matrix: uses: ./.github/workflows/linux_job.yml strategy: From aaf414b09c1e85eddf9308275353f038c647d894 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Mon, 8 May 2023 23:52:07 +0200 Subject: [PATCH 3/3] revert s3-prefix --- .github/workflows/linux_job.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux_job.yml b/.github/workflows/linux_job.yml index 1bc2147147..a27d6bb2d6 100644 --- a/.github/workflows/linux_job.yml +++ b/.github/workflows/linux_job.yml @@ -222,7 +222,8 @@ jobs: s3-bucket: doc-previews if-no-files-found: error path: ${{ env.RUNNER_DOCS_DIR }} - s3-prefix: pytorch/${{ env.REPOSITORY }}/${{ github.event.pull_request.number }} + # ${{ env.repository }} is $OWNER/$REPO + s3-prefix: ${{ env.REPOSITORY }}/${{ github.event.pull_request.number }} - name: Teardown Linux if: ${{ always() }}