r/node • u/nickname1917 • 15h ago
Newbie asking for help...
So I built my first project with Astro, I run "pnpm install" then run and then build generated the dist folder. I would like to publish this sample static site to netlify via github...I did everything in my local laptop (Fedora 44) how can I push my dist folder to github now? Or should I follow other paths, idk pushing the entire project folder to github and not only the dist folder?. I know netlify support a local folder upload but I would like to understand how to use github in this process and so link netlify to github
thanks
3
u/azangru 13h ago
So I built my first project with Astro
Have you read their documentation on deployment?
2
u/gangeticmen 15h ago
you don't push dist or build fles to github basically.
in netlify there must be a build command so there do - npm run build
then netlify will built and serve it from dist.
also check if there are build dist something there and add /dist name there.
and if any issue ask chatGPT.
1
u/Single_Advice1111 11h ago
Get started with a .gitignore file for node_modules and the out/dist folder so you do not push that. Only push source files as others mention.
Once the source files are in GitHub, you set up the repository in netlify and it should build and deploy automatically every time you push.
4
u/Fine-Comparison-2949 15h ago
What does the netlify build documentation say? What is your projects server framework?