Skip to content

Deploying An Eleventy Site to NeoCities with GitLab CI/CD

A guide to automatically deploying your Eleventy static site to NeoCities using GitLab CI/CD, including authentication, error handling, and optimizations.

B♾️

s I've [already written about before](https://blog.brennan.day/move-to-a-better-internet-in-2026-8ab3d36bae20), I love NeoCities. It is a free web hosting service embarcing the spirit of the early web, taking its name from the tragically-defunct [GeoCities](https://oneterabyteofkilobyteage.tumblr.com/).

For the sake of ease, I'm currently hosting my site with [Netlify](https://netlify.com), but I thought it would be a fun side quest to use GitLab's CI/CD pipeline to upload the rendered `_site` output of my static site to NeoCities via their API. Easy enough, right?

There were several reasons I wanted to try this. First, it would be a handy backup, particularly for someone like me who's trying to follow the [3-2-1 rule](https://www.veeam.com/blog/321-backup-rule.html). I would also just love to join the community, and maybe in the future I'll create a site that's specifically created for NeoCities rather than just a mirror.

The service also has a generous free tier! 1 GB of storage and 200 GB of bandwidth, with no server management or any sort of complex configuration. You just drag-and-drop files and they're hosted. (Or remotely upload the files, in my case.)

There _are_ limitations, of course, particularly with filetypes. I'll get into that.

So, this was ultimately my plan:

1. Automatically deploy my 11ty site to NeoCities with each commit 2. Support multiple authentication methods (username/password or API key) 3. Only upload modified files to ensure no wasted bandwidth 4. Filter out any unsupported file types automatically 5. Ensure robust error-handling and logging

Although, number five happened organically due to how many times I messed up and had no idea why. I am a _really_ good web developer, I swear.

Here's the **full** [`.gitlab-ci.yml`](https://gitlab.com/brennankbrown/brennan.day/-/blob/main/.gitlab-ci.yml) handling everything. It ended up rather extensive and lengthy. Everything below will be referencing this script.

## The NeoCities API

NeoCities provides a REST API with two authentication methods:

### 1. Basic Authentication (Username/Password) ```bash curl -u "username:password" https://neocities.org/api/info ```

### 2. Bearer Token (API Key) ```bash curl -H "Authorization: Bearer YOUR_API_KEY" https://neocities.org/api/info ```

You can get your API key at: [https://neocities.org/api/key](https://neocities.org/api/key)

### Supported File Types

NeoCities free accounts support a specific set of file extensions. The complete list includes:

``` apng asc atom avif bin cjs css csv dae eot epub geojson gif glb glsl gltf gpg htm html ico jpeg jpg js json jxl key kml knowl less manifest map markdown md mf mid midi mjs mtl obj opml osdx otf pdf pgp pls png py rdf resolveHandle rss sass scss sf2 svg text toml ts tsv ttf txt

Did you enjoy this article?

Recommend it — Standard Reader surfaces well-loved writing to more readers across the network.

Across the AtmosphereDiscussions