Skip to content

Commit 0cfa843

Browse files
committed
Disable LFS during checkout and handle LFS manually with proper auth
1 parent fc73f32 commit 0cfa843

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/docs-build.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,23 @@ jobs:
7070
token: ${{ secrets.GITHUB_TOKEN }}
7171
# only Pytorch has/uses notebooks
7272
submodules: ${{ matrix.pkg-name == 'pytorch' }}
73-
lfs: ${{ matrix.pkg-name == 'pytorch' }}
74-
- name: Configure Git LFS for submodules
73+
lfs: false # Disable LFS during checkout to avoid auth issues
74+
- name: Setup LFS and fetch notebooks manually
7575
if: ${{ matrix.pkg-name == 'pytorch' }}
7676
run: |
77+
# Configure Git to use token for all GitHub operations
78+
git config --global credential.helper store
79+
echo "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com" > ~/.git-credentials
80+
81+
# Navigate to submodule and configure LFS with correct URL
7782
cd _notebooks
7883
git config lfs.url "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/Lightning-AI/lightning-tutorials.git/info/lfs"
84+
git config credential.helper store
85+
86+
# Install and configure LFS
87+
git lfs install
88+
89+
# Fetch LFS objects
7990
git lfs fetch --all
8091
git lfs checkout
8192
- uses: actions/setup-python@v6

0 commit comments

Comments
 (0)