Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish to cloudflare pages unreliable #996

Open
strelok899 opened this issue Jul 10, 2021 · 8 comments
Open

Publish to cloudflare pages unreliable #996

strelok899 opened this issue Jul 10, 2021 · 8 comments

Comments

@strelok899
Copy link

I created github private repo.
Then connect it to cloudflare pages to automatically deploy commit to master. All good here.
Now the problem is when I sync from publii to gitlab to cloudflare pages.
Is a lot of times gets error on the last step of checking .
So I need to do sync serval times to make publii push the compiled files to github repo.

When I tried to use git hub pages it worked flawless.
So as I understand it the problem is that publii tries to verify the uploaded content on the final url and it can't verify on time because of the relative long deploy process.

@dziudek
Copy link
Collaborator

dziudek commented Jul 22, 2021

Hi,

Do you have a sync issue or the only problem is a fact that when click "Visit website" then the page is not updated yet on cloudflare pages?

@strelok899
Copy link
Author

The sync gives 502 bad gateway, and errors after some retries its works

@dziudek
Copy link
Collaborator

dziudek commented Jul 22, 2021

Hmmm, so it must be some issue with Github, because Cloudflare syncs the website automatically when Github repository is updated. So technically there is no difference if you are using Github Pages or Cloudflare pages - both uses Github sync.

@TheUltimateAbsol
Copy link

TheUltimateAbsol commented May 22, 2022

Doesn't gitlab pages structure the files very differently from github (i.e. stuffing them in a public folder and serving from there?)?

Is it even POSSIBLE to use gitlab pages with cloudflare?

EDIT: yes it is, turns out you just need to set the output folder in cloudflare pages to be "public"

@oeed
Copy link

oeed commented Oct 4, 2023

I am getting this all the time, appears to be the same as #1174. It seems to be happening basically every time I sync now my site has more posts and lots of large media files.

[Wed, 04 Oct 2023 04:18:16 GMT] (i) TRIED AGAIN: (api) => api.gitdata.createTree - undefined
[Wed, 04 Oct 2023 04:18:27 GMT] (i) TRIED AGAIN FAIL: (api) => api.gitdata.createTree - undefined
[Wed, 04 Oct 2023 04:18:27 GMT] ERROR: {"code":502,"status":"Bad Gateway","message":"{\n  \"message\": \"Server Error\"\n}\n"}

Seems to be related to: BetaHuhn/repo-file-sync-action#246

@dziudek
Copy link
Collaborator

dziudek commented Oct 4, 2023

Hi,

As GitHub and Gitlab APIs are quite problematic in handling, especially larger websites - in Publii v.0.44 planned for the next month we will implement Git support - it will be much faster and more reliable method of syncing pages. I have started the implementation using isomorphic-git and it seems to be a big step forward for any git-based websites.

If you are interested in this feature - I will prepare test version of Publii which will contain this feature, probably in the nearest 1-2 weeks. If you will want to use it earlier as beta-tester - feel free to leave a comment with platform which you are using.

When the beta version of this feature will be ready - I will prepare a separate issue with links to download

@oeed
Copy link

oeed commented Oct 4, 2023

@dziudek amazing, is it currently on a branch? I have a fork with a few tiny changes to support values I need, so I can just update from that branch (or if you want I can just PR my changes if they look reasonable, just never bothered as they're quite tiny) master...oeed:Publii:feed-tags

@dziudek
Copy link
Collaborator

dziudek commented Oct 5, 2023

@oeed - it is not ready yet, I will publish an information when the feature will be able for tests - most probably in the upcoming week :)

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

No branches or pull requests

4 participants