Skip to content

Commit

Permalink
prepare doc preview s3-prefix for future change (pytorch#97433)
Browse files Browse the repository at this point in the history
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: pytorch#97433
Approved by: https://github.com/seemethere, https://github.com/malfet
  • Loading branch information
pmeier authored and pytorchmergebot committed Mar 29, 2023
1 parent faccd87 commit 2f06fc2
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 2f06fc2

Please sign in to comment.