prepare doc preview s3-prefix for future change (#97433)

Sister patch for pytorch/test-infra#3917. TL;DR this moves the doc preview scheme to $OWNER/$REPO rather than $REPO that we are currently rolling.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/97433
Approved by: https://github.com/seemethere, https://github.com/malfet
This commit is contained in:
Philip Meier 2023-03-29 10:13:40 +00:00 committed by PyTorch MergeBot
parent faccd87658
commit 2f06fc2422

View file

@ -178,6 +178,41 @@ jobs:
if-no-files-found: error
path: functorch_ghpages/nightly/
s3-prefix: pytorch/${{ github.event.pull_request.number }}/functorchdocs
# The three upload steps below duplicate the upload from above, but to a different path. This is needed since we
# are in the process of changing the path, but want to keep the disruption to a minimum.
# See https://github.com/pytorch/test-infra/issues/3894
# After a grace period the s3-prefix should start with pytorch/pytorch/
- name: Upload Python Docs Preview (forward compatibility)
uses: seemethere/upload-artifact-s3@v5
if: ${{ github.event_name == 'pull_request' && matrix.docs_type == 'python' && steps.build-docs.outcome == 'success' }}
with:
retention-days: 14
s3-bucket: doc-previews
if-no-files-found: error
path: pytorch.github.io/docs/master/
s3-prefix: pytorch/pytorch/pytorch/${{ github.event.pull_request.number }}
- name: Upload C++ Docs Preview (forward compatibility)
uses: seemethere/upload-artifact-s3@v5
if: ${{ github.event_name == 'pull_request' && matrix.docs_type == 'cpp' && steps.build-docs.outcome == 'success' }}
with:
retention-days: 14
if-no-files-found: error
s3-bucket: doc-previews
path: cppdocs/
s3-prefix: pytorch/pytorch/pytorch/${{ github.event.pull_request.number }}/cppdocs
- name: Upload functorch Docs Preview (forward compatibility)
uses: seemethere/upload-artifact-s3@v5
if: ${{ github.event_name == 'pull_request' && matrix.docs_type == 'functorch' && steps.build-docs.outcome == 'success' }}
with:
retention-days: 14
s3-bucket: doc-previews
if-no-files-found: error
path: functorch_ghpages/nightly/
s3-prefix: pytorch/pytorch/pytorch/${{ github.event.pull_request.number }}/functorchdocs
- name: Teardown Linux
uses: pytorch/test-infra/.github/actions/teardown-linux@main
if: always()