Skip to content

Commit d8e8d1e

Browse files
Fix docs gh-pages publish authentication (#20890)
Summary: - Stop passing DOC_BUILD_GITHUB_TOKEN into the docs gh-pages publish job. - Stop overriding `origin` with that token before pushing generated docs. - Let the checkout credentials use the job's existing `contents: write` permission for the gh-pages push. Failure fixed: - https://github.com/pytorch/executorch/actions/runs/29237660083/job/86778638704 failed at `git push -f` with `Permission to pytorch/executorch.git denied to GregoryComer`. Testing: - git diff --check Notes: - PyYAML/actionlint are not installed in this local environment, so I could not run a workflow syntax parser locally.
1 parent 3b27657 commit d8e8d1e

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

.github/workflows/doc-build.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ jobs:
101101
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
102102
secrets: inherit
103103
with:
104-
secrets-env: DOC_BUILD_GITHUB_TOKEN
105104
repository: pytorch/executorch
106105
download-artifact: docs
107106
ref: gh-pages
@@ -135,9 +134,6 @@ jobs:
135134
mv "${RUNNER_ARTIFACT_DIR}"/html/* "${TARGET_FOLDER}"
136135
git add "${TARGET_FOLDER}" || true
137136
138-
echo "::add-mask::$SECRET_DOC_BUILD_GITHUB_TOKEN" # Mask the secret in GH logs
139-
git remote set-url origin https://x-access-token:$SECRET_DOC_BUILD_GITHUB_TOKEN@github.com/pytorch/executorch.git
140-
141137
git config user.name 'pytorchbot'
142138
git config user.email 'soumith+bot@pytorch.org'
143139
git commit -m "Auto-generating sphinx docs" || true

0 commit comments

Comments
 (0)