1
0
em.0x45.cz/content/posts/zola-deployment-with-gitea-actions-and-rsync/index.md.bak

39 lines
1.4 KiB
Markdown
Raw Normal View History

2024-05-06 12:30:55 +02:00
+++
title = "Zola website deployment with Drone CI"
date = 2022-09-28
[taxonomies]
categories = ["Linux"]
[extra]
author = "Emil Miler"
+++
Zola is my SSG of choice, as it it fast, powerfull and packed in a single statically linked binary. Here is how I use with in conjuction with Drone CI for automatic building and deployment to my webserver.
<!-- more -->
I have written a [bechelor's thesis](https://git.microlab.space/em/bakalarka) on static site generators and implementing a sample website with Zola in particular. Where my thesis lacks, though, is in the automatic deployment, where I botched together some Git hooks and shell scripts. It works fairly well, but it does not provide much feedback or code validity checks.
## Pipeline
The Drone pipeline has two main parts -- building and deployment itself. I chose to download a fixed version of Zola insted of using pre-made Docker images, because they were acting out during my testing. As of today, prebuilt Zola binaries still don't work with [musl libc](https://musl.libc.org/), so a Glibc based image is needed, such as Debian instead of Alpine.
Deployment is done using [drone-rsync](https://plugins.drone.io/plugins/rsync) plugin, whcich handles connection to a remove webserver and handles private keys via Drone secrets.
```
```
## Webserver configuration
```
create user
create website directory
check permissions
```
## SSH keys
```
ssh-keygen -t rsa -b 4096
```