{"id":3278,"date":"2021-08-25T11:16:29","date_gmt":"2021-08-25T11:16:29","guid":{"rendered":"https:\/\/helpdesk.spider-themes.net\/docs\/docy-jekyll-theme\/deployment\/netlify\/"},"modified":"2021-08-25T11:16:29","modified_gmt":"2021-08-25T11:16:29","slug":"netlify","status":"publish","type":"docs","link":"https:\/\/mantra4money.com\/index.php\/docs\/docy-jekyll-theme\/deployment\/netlify\/","title":{"rendered":"Netlify"},"content":{"rendered":"<h2 class=\"wp-block-heading\">Creating your Git Repo<\/h2><p>Create a new repository on GitHub. This could be performed using GitHub Desktop however, for the purposes of this guide, we will utilise the command line.<\/p><p>To avoid errors, do not initialize the new repository with README, license, or gitignore files. You can add these files after your project has been pushed to GitHub.<\/p><p>Open Terminal (for Mac users) or the command prompt (for Windows and Linux users).<\/p><p>For our purposes, let\u2019s call your new repo \u201cjekyll\u201d.<\/p><p>In the terminal, whilst in your site directory, initialize the directory as a Git repository:<\/p><pre class=\"wp-block-code\"><code><span class=\"has-inline-color has-vivid-green-cyan-color\">$ git init<\/span><\/code><\/pre><p>Add the files in your new local repository. This stages them for the first commit:<\/p><pre class=\"wp-block-code\"><code><span class=\"has-inline-color has-vivid-green-cyan-color\">$ git add .<\/span><\/code><\/pre><p>Commit the files that you\u2019ve staged in your local repository:<\/p><pre class=\"wp-block-code\"><code><span class=\"has-inline-color has-vivid-green-cyan-color\">$ git commit -m 'First commit'<\/span><\/code><\/pre><p>At the top of your GitHub repository\u2019s Quick Setup page, click the clipboard icon to copy the remote repository URL.<\/p><p>In Terminal, add the URL for the remote repository where your local repository will be pushed.<\/p><pre class=\"wp-block-code\"><code><span class=\"has-inline-color has-vivid-green-cyan-color\">git remote add origin &#91;your_Git_repository_URL]<\/span><\/code><\/pre><p>Now, it\u2019s time to push the changes in your local repository to GitHub:<\/p><pre class=\"wp-block-code\"><code><span class=\"has-inline-color has-vivid-green-cyan-color\">git push -u origin master<\/span><\/code><\/pre><p>Now that your assets are up and running on GitHub, let\u2019s connect them to Netlify.<\/p><h2 class=\"wp-block-heading\">Connecting to Netlify<\/h2><p>Once you log in to Netlify, you\u2019ll be taken to <a href=\"https:\/\/app.netlify.com\/\">https:\/\/app.netlify.com\/<\/a>. From here, select \u2018New site from Git\u2019:<\/p><figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/helpdesk.spider-themes.net\/wp-content\/uploads\/2021\/08\/new-site-from-git-betabp-1024x144.png\" alt=\"\" class=\"wp-image-3280\"\/><\/figure><p>Clicking \u201cNew Site\u201d brings you to this screen:<\/p><figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/helpdesk.spider-themes.net\/wp-content\/uploads\/2021\/08\/create-a-new-site-git.png\" alt=\"\" class=\"wp-image-3281\"\/><\/figure><p>Whenever you push an update to GitHub (or GitLab\/BitBucket), Netlify will automatically deploy your updates and changes!<br>Since your assets are hosted on your Git provider, you\u2019ll need to link Netlify to that provider. Follow the steps within the UI to link your account.<\/p><p><\/p><p>It\u2019s time to allow Netlify and GitHub to talk to each other. Clicking the \u201cAuthorize Application\u201d button will do just that. Netlify doesn\u2019t store your GitHub access token on our servers. If you\u2019d like to know more about the permissions Netlify requests and why we need them, you can visit <a href=\"https:\/\/www.netlify.com\/docs\/github-permissions\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.netlify.com\/docs\/github-permissions\/<\/a>.<\/p><p><\/p><figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/helpdesk.spider-themes.net\/wp-content\/uploads\/2021\/08\/choose_repo3.png\" alt=\"\" class=\"wp-image-3282\"\/><\/figure><p>Now that you\u2019ve connected Netlify and GitHub, you can see a list of your Git repos. There\u2019s the \u201cjekyll\u201d repo you just pushed to GitHub. Let\u2019s select it.<\/p><p><\/p><p>You now have the option to configure your deploy settings. For the purposes of this tutorial, the default parameters gathered by Netlify are appropriate. Click \u201cSave\u201d.<\/p><figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/helpdesk.spider-themes.net\/wp-content\/uploads\/2021\/08\/deploy_in_progress_3-1024x380.png\" alt=\"\" class=\"wp-image-3283\"\/><\/figure><p>That\u2019s almost it! Now, you can kick back and wait a couple of moments until Netlify does its thing.<\/p><p><\/p><p>And there we have it! That\u2019s it. Done. Your site has now been deployed to Netlify along with a Netlify subdomain. From here, you\u2019re free to add your own custom domain and explore what else Netlify can do!<\/p>","protected":false},"excerpt":{"rendered":"<p>Creating your Git Repo Create a new repository on GitHub. This could be performed using GitHub Desktop however, for the purposes of this guide, we will utilise the command line. To avoid errors, do not initialize the new repository with README, license, or gitignore files. You can add these files after your project has been [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3274,"menu_order":1,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-3278","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"acf":[],"_links":{"self":[{"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/docs\/3278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/comments?post=3278"}],"version-history":[{"count":0,"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/docs\/3278\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/docs\/3274"}],"wp:attachment":[{"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/media?parent=3278"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/doc_tag?post=3278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}