Skip to content

Commit af000ed

Browse files
committed
Revert "[REVERTME] emulate main push"
This reverts commit 21f2ce1.
1 parent dd83803 commit af000ed

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/docs.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ jobs:
5757
5858
upload:
5959
needs: build
60-
# if: github.repository == 'pytorch/vision' && github.event_name == 'push' &&
61-
# ((github.ref_type == 'branch' && github.ref_name == 'main') || github.ref_type == 'tag')
62-
# permissions:
63-
# contents: write
60+
if: github.repository == 'pytorch/vision' && github.event_name == 'push' &&
61+
((github.ref_type == 'branch' && github.ref_name == 'main') || github.ref_type == 'tag')
62+
permissions:
63+
contents: write
6464
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
6565
with:
6666
repository: pytorch/vision
@@ -69,8 +69,8 @@ jobs:
6969
script: |
7070
set -euo pipefail
7171
72-
REF_TYPE=branch
73-
REF_NAME=main
72+
REF_TYPE=${{ github.ref_type }}
73+
REF_NAME=${{ github.ref_name }}
7474
7575
if [[ "${REF_TYPE}" == branch ]]; then
7676
TARGET_FOLDER="${REF_NAME}"
@@ -104,5 +104,4 @@ jobs:
104104
git config user.email '[email protected]'
105105
git config user.name 'pytorchbot'
106106
git commit -m "auto-generating sphinx docs" || true
107-
# git push -u origin gh-pages
108-
git status
107+
git push -u origin gh-pages

0 commit comments

Comments
 (0)