summaryrefslogtreecommitdiff
path: root/content/posts/automatically-deploy-your-website-with-git-hooks.md
blob: a2af52e8381e104f96d16364a9b4571d84d272c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
title: 'Automatically Deploy Your Website With Git Hooks'
description: 'How to automatically deploy your website using git hooks'
date: '2024-11-14'
tags: ['linux', 'git', 'web']
draft: true
---

In the spirit of [small web](https://small-web.org) and [indie web](https://indieweb.org) let's take a look at how we can deploy our own website with git hooks and a simple shell script.

<!--more-->

In the old days, before Wordpress and git, you developed your website locally on your computer using HTML, CSS and Javascript. When you wanted to deploy a new version of your site, you simply opened a FTP program, connected to the webserver and drag-and-drop the files into it.

In the modern days, things have become more complicated and people often tie into paid services to avoid the complexity of deploying your own website. But, if you are a little interessted in web servers, git and owning your content it doesnt have to be that complicated.

## 1. Setup a server

You own server at home.
Using Linode/Digital Ocean.

## 2. Setup a domain

## 2. Install a web server

Either nginx or Apache2

## 3. Install git

## 4. Setup git hooks

## 5. Deploy with git push