publish-spa icon indicating copy to clipboard operation
publish-spa copied to clipboard

Graph with pdf larger than 100 MB fails to publish

Open varnem2 opened this issue 4 months ago • 2 comments

What Happened?

Given: I hit save on Logseq with a pdf larger then 100 MB. Then: I need that change to be saved on my Github-Pages website.

What's actually happening: I'm getting an error during the final push to the github actions branch.

/usr/bin/git push --force ***github.com/varnem2/cyberpunk.git github-pages-deploy-action/23m5o9btt:gh-pages
remote: error: Trace: 43ac3ee0bbb1b176ddf473ae9c74f4ff23c427637c6edf396b321c047863cdf2        
remote: error: See https://gh.io/lfs for more information.        
remote: error: File assets/Cyberpunk_Red_1755890258178_0.pdf is 294.64 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./        
To https://github.com/varnem2/cyberpunk.git
 ! [remote rejected] github-pages-deploy-action/23m5o9btt -> gh-pages (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/varnem2/cyberpunk.git'
Running post deployment cleanup jobs… 🗑️
/usr/bin/git checkout -B github-pages-deploy-action/23m5o9btt
Reset branch 'github-pages-deploy-action/23m5o9btt'
/usr/bin/chmod -R +rw github-pages-deploy-action-temp-deployment-folder
/usr/bin/git worktree remove github-pages-deploy-action-temp-deployment-folder --force
Error: The deploy step encountered an error: The process '/usr/bin/git' failed with exit code 1 ❌
Notice: Deployment failed! ❌

Other Comments:

Per https://github.com/JamesIves/github-pages-deploy-action/issues/1139 the github action step https://github.com/logseq/publish-spa/blob/main/action.yml#L37-L41 needs the following yaml added to enable lfs.

    - name: Checkout action
      uses: actions/checkout@v4
      with:
        repository: logseq/publish-spa
        path: .logseq-publish-spa
        lfs: true

Reproduce the Bug

  1. Create a new Github Repo and configure git lfs.
git init && git lfs install && git lfs track *.pdf
  1. Create Github repo and run command to add repo as valid remote
git remote add origin $repo
  1. Ensure github pages classic is enabled in the repo
  1. Open folder as logseq vault using the most recent beta version 0.10.13
  2. Add in github actions build.yml
  3. Mark page public using the 3 dots at the top of the screen.
  4. Drag pdf into the desktop window in that's larger then 100MB.
  5. Ensure logseq has successfully committed the file by checking your repo
  6. Review logs to ensure build is successful
  7. Go to github pages url and navigate to where you expect to see the pdf

Expected Behavior

I expect github action to deploy the asset successfully.

Desktop or Mobile Platform Information

Logseq App Version: 0.10.13 Example repos:

https://github.com/varnem2/cyberpunk/actions/runs/17165808918/job/48705870314 https://github.com/varnem2/cyberpunk/blob/master/.github/workflows/main1.yml

varnem2 avatar Aug 22 '25 21:08 varnem2

While at face value this statement is accurate that logseq isn't the problem. This issue was opened against the publish-spa repo which does a separate checkout command.

While logseq itself isn't within the problem scope, the action that logseq created is.

Thanks! Matt Varner

On Sat, Aug 23, 2025, 6:18 AM Daniel Ruf @.***> wrote:

DanielRuf left a comment (logseq/publish-spa#44) https://github.com/logseq/publish-spa/issues/44#issuecomment-3216675514

The problem is explained in the log:

remote: error: See https://gh.io/lfs for more information. remote: error: File assets/Cyberpunk_Red_1755890258178_0.pdf is 294.64 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./

The limit comes from GitHub LFS. Check the provided links fo the details. Logseq itself does not cause this problem.

— Reply to this email directly, view it on GitHub https://github.com/logseq/publish-spa/issues/44#issuecomment-3216675514, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKCZHCNX5EIM3IJ7TBGNBTT3PA5WJAVCNFSM6AAAAACETBKFSOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTEMJWGY3TKNJRGQ . You are receiving this because you authored the thread.Message ID: @.***>

varnem2 avatar Aug 23 '25 15:08 varnem2

I had removed my comment because I had the feeling that the documentation for GitHub was not checked before opening this issue and you will rather sooner than later find out, that it won't work. I'm not sure if this will solve the issue. Did you already test by setting this?

From the Git LFS documentation for GitHub at https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-git-large-file-storage (emphasis by me):

Git LFS cannot be used with GitHub Pages sites.

From the documentation of the action at https://github.com/logseq/publish-spa?tab=readme-ov-file#github-action (emphasis by me):

To setup this action, enable github pages on your repository ... That's it! Your graph will publish on future git pushes by pushing to the gh-pages branch.

Knowing GitHub and their restrictions (especially for GH Pages as alternative to Jekyll): you will likely hit a roadblock with this (sometimes it might work even if the opposite is documented, but GitHub will silently change and break this like they did with other features).

Best is to check with GitHub support, if this will work for this action, especially since the documentation says otherwise.

DanielRuf avatar Aug 23 '25 18:08 DanielRuf