@@ -61,31 +61,31 @@ jobs:
6161 name : docs
6262 path : docs/build/html/
6363
64- # doc-preview:
65- # runs-on: [ubuntu-latest]
66- # needs: build-docs
67- # if: ${{ github.event_name == 'pull_request' }}
68- # steps:
69- # - name: Checkout
70- # uses: actions/checkout@v4
71- # - name: Download artifact
72- # uses: actions/download-artifact@v4
73- # with:
74- # name: docs
75- # path: docs
76- # - name: Add noindex to preview docs
77- # run: |
78- # echo "Adding noindex meta tag to prevent search engine indexing of preview docs"
79- # find docs -name "*.html" -print0 | xargs -0 sed -i 's/<head>/<head>\n <meta name="robots" content="noindex">/'
80- # - name: Upload docs preview
81- # uses: seemethere/upload-artifact-s3@v5
82- # if: ${{ github.event_name == 'pull_request' }}
83- # with:
84- # retention-days: 14
85- # s3-bucket: doc-previews
86- # if-no-files-found: error
87- # path: docs
88- # s3-prefix: meta-pytorch/forge/${{ github.event.pull_request.number }}
64+ doc-preview :
65+ runs-on : [ubuntu-latest]
66+ needs : build-docs
67+ if : ${{ github.event_name == 'pull_request' }}
68+ steps :
69+ - name : Checkout
70+ uses : actions/checkout@v4
71+ - name : Download artifact
72+ uses : actions/download-artifact@v4
73+ with :
74+ name : docs
75+ path : docs
76+ - name : Add noindex to preview docs
77+ run : |
78+ echo "Adding noindex meta tag to prevent search engine indexing of preview docs"
79+ find docs -name "*.html" -print0 | xargs -0 sed -i 's/<head>/<head>\n <meta name="robots" content="noindex">/'
80+ - name : Upload docs preview
81+ uses : seemethere/upload-artifact-s3@v5
82+ if : ${{ github.event_name == 'pull_request' }}
83+ with :
84+ retention-days : 14
85+ s3-bucket : doc-previews
86+ if-no-files-found : error
87+ path : docs
88+ s3-prefix : meta-pytorch/forge/${{ github.event.pull_request.number }}
8989
9090 upload :
9191 runs-on : ubuntu-latest
0 commit comments