Skip to content

Commit

Permalink
add hosting tags to relevant posts, fix link formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ConorSheehan1 committed Mar 7, 2024
1 parent a05940f commit 7c7699f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dev_to: https://dev.to/conorsheehan1/netlify-deployments-from-github-without-giv

[Netlify](https://www.netlify.com/) is a great hosting service, but there's one thing that bothers me about it. The default deployment path involves giving the service **read *and* write access** to all of your **public *and* private repositories** on GitHub :scream:

https://docs.netlify.com/site-deploys/create-deploys/#deploy-with-git
[https://docs.netlify.com/site-deploys/create-deploys/#deploy-with-git](https://docs.netlify.com/site-deploys/create-deploys/#deploy-with-git)

They skip over the authorization step in the video on their docs, but here's what it looks like.

Expand All @@ -17,13 +17,13 @@ They skip over the authorization step in the video on their docs, but here's wha
I found [some](https://answers.netlify.com/t/why-do-you-need-write-permissions-to-my-repository/7897) [questions](https://answers.netlify.com/t/new-github-permissions/37939) on their forums asking about this. There's even an open [issue](https://github.com/netlify/netlify-cms/issues/4329) on their GitHub about it. Despite all the links I visited, I didn't find a clear way to automate deploys to Netlify without giving them full access to my GitHub, so here's how I managed to do it.

## Initial drag and drop deploy
Before we can automate our deploys, we need a site ID. Netlify provides a drag and drop feature, so we can drag the output of a build, or even a folder with an empty `index.html` to create a new site. https://app.netlify.com/drop
Before we can automate our deploys, we need a site ID. Netlify provides a drag and drop feature, so we can drag the output of a build, or even a folder with an empty `index.html` to create a new site. [https://app.netlify.com/drop](https://app.netlify.com/drop)

## GitHub action
Now that we have a Netlify site created, we can automate deploys to it. I used https://github.com/jsmrcaga/action-netlify-deploy, which requires an auth token and a site ID.
Now that we have a Netlify site created, we can automate deploys to it. I used [https://github.com/jsmrcaga/action-netlify-deploy](https://github.com/jsmrcaga/action-netlify-deploy), which requires an auth token and a site ID.

### Generate auth token
We can generate a Netlify auth token by going to https://app.netlify.com/user/applications#personal-access-tokens. Click `New Access Token`, then give it a description and click `generate`. Copy the value, it won't be displayed again.
We can generate a Netlify auth token by going to [https://app.netlify.com/user/applications#personal-access-tokens](https://app.netlify.com/user/applications#personal-access-tokens). Click `New Access Token`, then give it a description and click `generate`. Copy the value, it won't be displayed again.

To make the value accessible to the GitHub action, go to your GitHub repository and click `settings` -> `secrets` -> `new repository secret`. I named mine `NETLIFY_AUTH_TOKEN` and pasted in the value I copied from Netlify.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: blog
categories: blog
tags: devto
tags: devto hosting
imagedir: /assets/images/beach_litriochta
---

Expand Down
2 changes: 1 addition & 1 deletion _posts/2022-09-08-jekyll-plugins-on-github-pages.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: post
categories: personal
tags: jekyll ruby github-pages
tags: jekyll ruby github-pages hosting
---

I finally got tags and categories pages working for this website!
Expand Down

0 comments on commit 7c7699f

Please sign in to comment.