Skip to content
Merged
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ env:

jobs:
docs-make:
if: github.event.pull_request.draft == false
if: github.event_name != 'pull_request' || github.event.pull_request.draft == true
runs-on: ubuntu-22.04
strategy:
fail-fast: false
Expand All @@ -67,9 +67,44 @@ jobs:
- uses: actions/checkout@v5
with:
ref: ${{ inputs.checkout }}
token: ${{ secrets.GITHUB_TOKEN }}
# only Pytorch has/uses notebooks
submodules: ${{ matrix.pkg-name == 'pytorch' }}
lfs: ${{ matrix.pkg-name == 'pytorch' }}
lfs: false # Disable LFS during checkout to avoid auth issues
- name: Setup LFS and fetch notebooks manually
if: ${{ matrix.pkg-name == 'pytorch' }}
run: |
# Configure Git to use token for all GitHub operations
git config --global credential.helper store
echo "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com" > ~/.git-credentials

# Navigate to submodule and configure LFS with correct URL
cd _notebooks

# Check current remote and LFS config
echo "Current remote:"
git remote -v
echo "Current LFS config:"
git config --list | grep lfs || true

# Set the correct remote URL with token
git remote set-url origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/Lightning-AI/lightning-tutorials.git"

# Configure LFS more aggressively
git config lfs.url "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/Lightning-AI/lightning-tutorials.git/info/lfs"
git config --add lfs.https://github.com/Lightning-AI/tutorials.git/info/lfs.access basic
git config --add lfs.https://github.com/Lightning-AI/lightning-tutorials.git/info/lfs.access basic
git config credential.helper store

# Install and configure LFS
git lfs install

# Try to fetch with environment variable override
export GIT_LFS_ENDPOINT="https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/Lightning-AI/lightning-tutorials.git/info/lfs"

# Fetch LFS objects
git lfs fetch --all
git lfs checkout
- uses: actions/setup-python@v6
with:
python-version: "3.10"
Expand Down
Loading