Closed NoelOConnell closed 4 months ago
I just upgraded https://github.com/emmatown/keystatic-astro-cloudflare-workers-test and it seems to be working fine?
Thanks for the reply, I updated my fork to match your recent changes and still have the same issue.
https://keystatic-astro-cloudflare-workers-test-env.pages.dev/ https://github.com/NoelOConnell/keystatic-astro-cloudflare-workers-test
It deploys fine and the site works but I can't get pass the "login with Github" button on the /keystatic
page so I can't go through the Github setup flow as per the docs.
https://keystatic.com/docs/github-mode#connecting-with-git-hub
Is there any specific Cloudflare options/configuration required? Is there a way to setup the Github app another way to see if that is the part causing the issue?
Okay, I manage to get it to work.
I ran the project locally in github mode and I was able to go through the "login with Github" flow to create the Github app.
Since it was setup locally is saves the localhost url for the callback links so I had to manually edit the newly create app in my Github account using the link https://github.com/settings/apps/{app name here} in my case that was {githubusername-keystatic}. I also had to add the new created KEYSTATIC_
variables to Cloudflare.
They /keystatic
url now works and loads correctly but I can't make any changes, I just get Update, I had to install the app on the repo since that part of the workflow failed due to the incorrect callback path for localhost.[GraphQL] Resource not accessible by integration
for any action.
So the issue is setting up the Github workflow and not the Cloudflare adapter.
@NoelOConnell can this issue be closed?
The GitHub App setup flow asks for the deployed URL so it can also add that URL as a callback URL as well but if that's missing then naturally you have to go into the GitHub App settings to add it yourself so everything here seems to working fine
The
/keystatic
page renders the "login with Github" button but clicking that gives a 404.From the logs in Cloudflare
It seems that the handler is null https://github.com/withastro/astro/blob/e88eeb033749bd6bce8c00e712e207690ae9bf79/packages/astro/src/runtime/server/endpoint.ts#L26
It's a empty site with just a single
index.astro
page. This is what gets built and uploaded to Cloudflare.Here's the dependency list
I also forked Emma's Keystatic Cloudfare demo repo and updated packages and it shows the same issue.