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

github Deploy to Cloudflare Pages erro #82

Open
vikim540 opened this issue Jun 16, 2023 · 5 comments
Open

github Deploy to Cloudflare Pages erro #82

vikim540 opened this issue Jun 16, 2023 · 5 comments

Comments

@vikim540
Copy link

image

Run yarn deploy:github
yarn run v1.22.19
$ node ops/sync_project_config.js && node ops/direct_upload.js
Sync-ing for [production]...
/home/runner/work/microfeed-cloudflare-cms/microfeed-cloudflare-cms/ops/lib/utils.js:94
body.result.forEach((result) => {
^

TypeError: Cannot read properties of undefined (reading 'forEach')
at IncomingMessage. (/home/runner/work/microfeed-cloudflare-cms/microfeed-cloudflare-cms/ops/lib/utils.js:94:21)
at IncomingMessage.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1345:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

Node.js v17.9.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.

@gnoejuan
Copy link

gnoejuan commented Dec 5, 2023

Bumping cause I'm also running into the same issue :^)

@wenbinf
Copy link
Member

wenbinf commented Dec 6, 2023

Bumping cause I'm also running into the same issue :^)

It's likely to be invalid project name / cloudflare api keys.

Could you please double check if variables are set correctly and try again?
https://github.com/microfeed/microfeed#step-2-put-some-secrets-on-your-forked-repo

@gnoejuan
Copy link

gnoejuan commented Dec 6, 2023

Bumping cause I'm also running into the same issue :^)

It's likely to be invalid project name / cloudflare api keys.

Could you please double check if variables are set correctly and try again? https://github.com/microfeed/microfeed#step-2-put-some-secrets-on-your-forked-repo

The documentation screenshot doesn't match when I open the secrets link

The documentation screenshot seems to imply there is only 1 type of Secret. When I open the link, there is both an "Environment secrets" and "Repository secrets."

I currently have the secrets under "Repository secrets".

Willing to share a screenshot through a private channel of communication if necessary.

@wenbinf
Copy link
Member

wenbinf commented Dec 6, 2023

Bumping cause I'm also running into the same issue :^)

It's likely to be invalid project name / cloudflare api keys.
Could you please double check if variables are set correctly and try again? https://github.com/microfeed/microfeed#step-2-put-some-secrets-on-your-forked-repo

The documentation screenshot doesn't match when I open the secrets link

The documentation screenshot seems to imply there is only 1 type of Secret. When I open the link, there is both an "Environment secrets" and "Repository secrets."

I currently have the secrets under "Repository secrets".

Willing to share a screenshot through a private channel of communication if necessary.

You can use repository secrets (TODO for us: update screenshot for latest github ui).
Please double check if those secrets are correct - you can recreate those secrets. And try again.
Note: make sure your CLOUDFLARE_PROJECT_NAME is correct, e.g., don't use underscore (_), space ( ).

@gnoejuan
Copy link

gnoejuan commented Dec 8, 2023

You were right. There was an Auth issue. This was my first time using Github Actions, the little snippet of logs wasn't useful, but reading the raw logs helped me figure out I had used the wrong API key

image

request to the Cloudflare API (/accounts/***/d1/database) failed.

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

3 participants