-
Notifications
You must be signed in to change notification settings - Fork 809
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
Add a command to deploy on IPFS with Spheron CLI #303
Conversation
Hey @sverps @technophile-04 I just rebased my branch with main. Let me know if there is anything needed to be updated. Would love to see this merged. |
@@ -11,7 +11,8 @@ | |||
"format": "prettier --write . '!(node_module|.next|contracts)/**/*'", | |||
"check-types": "tsc --noEmit --incremental", | |||
"vercel": "vercel", | |||
"vercel:yolo": "vercel --build-env NEXT_PUBLIC_IGNORE_BUILD_ERROR=true" | |||
"vercel:yolo": "vercel --build-env NEXT_PUBLIC_IGNORE_BUILD_ERROR=true", | |||
"spheron": "next build && next export && spheron login --github && spheron publish" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we instead use spheron upload --path ./out --protocol ipfs
and omit the spheron.json
file? I prefer to keep the optional config files to a minimum to avoid potentially confusing users.
@@ -11,7 +11,8 @@ | |||
"format": "prettier --write . '!(node_module|.next|contracts)/**/*'", | |||
"check-types": "tsc --noEmit --incremental", | |||
"vercel": "vercel", | |||
"vercel:yolo": "vercel --build-env NEXT_PUBLIC_IGNORE_BUILD_ERROR=true" | |||
"vercel:yolo": "vercel --build-env NEXT_PUBLIC_IGNORE_BUILD_ERROR=true", | |||
"spheron": "next build && next export && spheron login --github && spheron publish" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the newly added local blockexplorer, next export
fails since it doesn't work with getServerSideProps
. So we'll have to think about a potential solution for this.
Maybe in favor of ipfs deployment options (and potentially other deployment options that require next export
) we could opt to omit the code tab from the blockexplorer while thinkink of a different way to include it (since I think the value of that tab might be rather limited). What do you think @carletex @technophile-04
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, I had maintained todo #351 (review) check out points 2 and 3, also mentioned possible solution there nextjs pageExtensions but I will create an issue for pt.2 and 3 🙌
Hey @rekpero , sorry for not picking this up sooner. Let's try and get this included, always nice to provide users with some options for deployment. Added some comments. |
Hey, @rekpero really sorry for reviewing it late 😅 Issuese noticed :
My Thoughts :
Some Question:
Tysm @rekpero !! Sorry for the long review just wanted to make sure we choose the best tool which is simple, nice DX, has less friction, and provides the best free value 🙌 |
Closing this for now, please feel free to re-open Thanks all 🙌 |
I've added a command
npm run spheron
oryarn spheron
to build directly, export it to static files and then upload to ipfs using spheron CLI.You can even change it to Filecoin or Arweave by changing the
spheron.json
inside nextjs tofilecoin
orarweave
.My intention of doing this is inspired by the original scaffold-eth ipfs command in the react-app package to deploy the app on IPFS.
Let me know if there are any changes needed somewhere. I am happy to talk about it in the PR.
Happy buidl, guys!