A dead-simple guide on how to deploy your first website on Netlify, either through a Git repository, or a regular static HTML site!
Free-From is my new series where I write guides and information without anything unnecessary. It’s straight to the point.
Netlify - netlify.comWhat Is Netlify?
Netlify allows you to build and deploy websites directly from either a Git repository, or a folder on your computer. You can use a Git repo to ensure changes pushed to a specific branch are automatically deployed within seconds, or use a folder when you don’t need to update as often.
Netlify really is as easy as they say. It will build your site automatically when using a Git repository - all you need to do is type your build command.
Publish With Git
Using a Git repository with Netlify couldn’t be more simple.
The Steps
- Go to Netlify and click Sign Up to register an account. No credit card required!
- Log into your new account and click New site from Git
- Select a Git provider (GitHub, GitLab, Bitbucket) and go through their authentication process. Pick out the repositories you want to publish with Netlify, or just allow access to all - Netlify won't build any unless you tell it to in the next steps
- Select a repository to publish from the list
- If you’re using a static site generator like Next.js, type your build command and build directory (where your output files are located)
- If you need to, click Advanced to change environment variables and other bits (you can do this after deployment too)
- Click Deploy Site
- Visit your new site with the URL (ending “.netlify.app”) displayed at the top of the window
Publish With Static Pages
You can use a directory containing a regular static HTML site instead of Git.
The Steps
- Go to Netlify and click Sign Up to register an account. No credit card required!
- Log into your new account
- In your file explorer, navigate to the directory containing your website folder
- Click and drag the folder onto the Netlify window
- Visit your new site with the URL (ending “.netlify.app”) displayed at the top of the window. It deploys automatically!