Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 22, 2025

This PR adds Git Large File Storage (LFS) support to handle deployments containing files larger than GitHub's 100MB limit. Previously, users with LFS-tracked files would encounter deployment failures because the action was copying actual large binary files instead of LFS pointer files.

Problem

When deploying repositories containing large files tracked by Git LFS, users would see errors like:

remote: error: File index.pck is 101.05 MB; this exceeds GitHub's file size limit of 100.00 MB        
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.

This occurred because Git LFS was not configured in the deployment process, causing the action to copy the actual large files rather than the LFS pointer files.

Solution

Added a new git-lfs input parameter that:

  1. Configures Git LFS in the workspace - Runs git lfs install in the main workspace when enabled
  2. Configures Git LFS in the deployment directory - Ensures LFS is also set up in the temporary worktree used for deployment
  3. Maintains backward compatibility - Defaults to false, requiring explicit opt-in

Usage

- name: Deploy to GitHub Pages
  uses: JamesIves/github-pages-deploy-action@v4
  with:
    folder: build
    git-lfs: true

Key Changes

  • New input parameter: git-lfs with boolean type and false default
  • Enhanced git initialization: Configures LFS when enabled with proper error handling
  • Worktree LFS support: Ensures LFS is configured in the deployment environment
  • Comprehensive testing: Added dedicated test suite for LFS functionality
  • Updated documentation: Includes usage examples and setup instructions

The implementation properly handles LFS pointer files during the deployment process, allowing users to deploy repositories containing large assets like game files, media content, or other binary data without hitting GitHub's file size limits.

Fixes #1896.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits September 22, 2025 01:21
Co-authored-by: JamesIves <10888441+JamesIves@users.noreply.github.com>
Co-authored-by: JamesIves <10888441+JamesIves@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] bug: 🐝 lfs file push failed Add Git LFS support for deploying repositories with large files Sep 22, 2025
@Copilot Copilot AI requested a review from JamesIves September 22, 2025 01:29
Copilot finished work on behalf of JamesIves September 22, 2025 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: 🐝 lfs file push failed

2 participants