Netlify is a platform that offers cloud hosting and serverless back-end services for static websites. With Netlify you can either work from a GitHub repository, or by uploading data directly to the platform. Netlify is like GitHub, but has a lot more capabilities to work at scale. The service allows for asset bundling, caching, development site testing, and has high rate limits.
Note: The default root URL for websites published using Netlify is: customname.netlify.app.
To deploy a new site using files stored locally, go to the ‘Sites’ tab in Netlify. Next, drag and drop your project folder in the box labeled ‘drag and drop your site folder here’. Files must be stored in a folder, as Netlify does accept individual project files.
After you have successfully uploaded your project folder, your project will be assigned a default URL and you will be directed to the deployment overview page.
The final step is to change the site name. Select ‘Site Settings’. Under ‘Site Information’ select ‘Change site name’ and input a new name for your project site.
With Netlify, you can deploy a site by linking directly to GitHub Link (or supported version-control tool of choice).
Under ‘Sites’, select ‘New site from Git’.
Next, select the Git provider where your site’s source code is hosted (GitHub, GitLab, or Bitbucket). In this example, we will be using GitHub. Once you’ve selected a Git provider, you will be prompted to allow Netlify to access your GitHub repositories. Netlify doesn’t store your GitHub access token on their servers. If you’d like to know more about the permissions Netlify requests, you can visit their documentation on Git provider permissions.
After connecting to your GitHub account, choose the repository you want to link to your site on Netlify.
If you are not using a static site generator or build tool, click ‘Deploy site’.
If you are using a static site generator or build tool, then you will need to configure the following settings to build your site:
- Add your build command (e.g. npm run build)
- Make sure that your publish directory is where your public site files are placed after building the sites.
- Click Deploy site
Once your site is deployed, the final step is to change the site name. In Netlify, select ‘Site Settings’. Under ‘Site Information’ select ‘Change site name’ and input a new name for your project site.