gregrickaby / nextjs-github-pages Goto Github PK
View Code? Open in Web Editor NEWπ Deploy a Next.js app to GitHub Pages via GitHub Actions.
Home Page: https://gregrickaby.github.io/nextjs-github-pages/
License: MIT License
π Deploy a Next.js app to GitHub Pages via GitHub Actions.
Home Page: https://gregrickaby.github.io/nextjs-github-pages/
License: MIT License
I tried printing the files/folders after the next build in github actions. I get the following result:
Run ls -a
.
..
.eslintrc.json
.git
.github
.gitignore
.next
README.md
next-env.d.ts
next.config.js
next.config.mjs
node_modules
package-lock.json
package.json
postcss.config.js
public
src
tailwind.config.ts
tsconfig.json```
There is no `/out` folder created, However, when running on my local machine, it works just fine. Can anyone please help me with this?
Hi Greg, thanks so much for this!! As a nonprofit we cannot afford Vercel so this is our only option :)
Here is the error we're seeing when we run the script via github actions following https://gregrickaby.blog/article/nextjs-github-pages:
Run npm install
added 27 packages, and audited 28 packages in 4s
2 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
> build
> next build
warn - No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry
info - Checking validity of types...
Failed to compile.
./components/CodeBlock.tsx:10:22
Type error: Cannot find name 'Prism'.
8 |
9 | React.useEffect(() => {
> 10 | if (ref.current) Prism.highlightElement(ref.current,false);
| ^
11 | }, [children]);
12 |
13 | return (
Error: Process completed with exit code 1.
Any ideas how to debug?
Here's the script: https://github.com/onefact/handbook.onefact.org/blob/main/.github/workflows/deploy.yml
Thanks again!!!
Great work on the tutorial!
When running the line you gave with the keygen, the terminal said there were too many commands. So, breaking it down, I was able to get the keygen done but -t rsa returns this error message:
"-t : The term '-t' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:1
I don't fully understand all the steps happening here, so it's tough to try and debug or find a workaround. If you have Discord and want to chat about it, let me know!
Is it possible to use github pages with app router introduced in next.js v13?
idk what could be the issue, i followed the instruction on the blog post
when i commit and the action starts it hangs on the "Deploy" task and does nothing, no logs or anything...
did i missed something?
how would you go about deploying to username.github.io
rather than username.github.io/repo-name/
? edit the assetPrefix
value in nexts.config.js
?
output: "export" is deprecated. It doesn't work anymore.
Error: Action failed with "not found deploy key or tokens"
While deploying with github actions :
/usr/bin/git push origin gh-pages
warning: url contains a newline in its host component: https://x-access-token:***
Super helpful!! Thank you :)
Any idea how we might be able to get images working?
Iβve been trying to get the static import working (https://nextjs.org/docs/basic-features/image-optimization) on GitHub pages, and canβt figure out how to debug (for onefact.org and Payless.health)
Thank you again!
The only problem I can see with Github pages, we can not use API in Github. we can call API in getStaticProps but all the nextjs API is 404.
https://gregrickaby.github.io/nextjs-github-pages/api/hello
Do you have any fix for this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.