Skip to content

Commit aa3d690

Browse files
committed
Improve Git LFS fix: set credentials before checkout and add explicit token
1 parent f79ca3c commit aa3d690

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/docs-build.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,18 @@ jobs:
6464
PIN_RELEASE_VERSIONS: 1
6565
ARTIFACT_DAYS: 0
6666
steps:
67+
- name: Setup Git LFS credentials
68+
if: ${{ matrix.pkg-name == 'pytorch' }}
69+
run: |
70+
git config --global credential.helper store
71+
echo "https://$GITHUB_ACTOR:[email protected]" > ~/.git-credentials
6772
- uses: actions/checkout@v5
6873
with:
6974
ref: ${{ inputs.checkout }}
75+
token: ${{ secrets.GITHUB_TOKEN }}
7076
# only Pytorch has/uses notebooks
7177
submodules: ${{ matrix.pkg-name == 'pytorch' }}
7278
lfs: ${{ matrix.pkg-name == 'pytorch' }}
73-
- name: Setup Git LFS credentials
74-
if: ${{ matrix.pkg-name == 'pytorch' }}
75-
run: |
76-
git config --global credential.helper store
77-
echo "https://$GITHUB_ACTOR:[email protected]" > ~/.git-credentials
7879
- uses: actions/setup-python@v6
7980
with:
8081
python-version: "3.10"

0 commit comments

Comments
 (0)