Lighting a candle before a deployment
I made a GitHub Action to light a virtual candle at the Cathedral of Santiago de Compostela.
It started as a joke about deployments. Some releases, especially the ones involving a database migration or a change that has been waiting too long, feel like they could use a bit of extra (divine) help. The cathedral has a website where anyone can light a virtual candle and leave a message. I checked how the form worked and turned it into a small action called light-a-candle.
What the action does
The action accepts a message, an author, and a timeout. It sends them to the same public form used by the website and exposes a success output when the request returns a successful response.
The action is intentionally small. It uses Node’s built-in https module and @actions/core, encodes the message as a normal form submission, and treats a redirect or another successful HTTP response as confirmation that the request went through.
name: Light a candle
on:
push:
branches: [main]
jobs:
light-candle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Light candle
uses: Napuh/light-a-candle@v1
with:
message: "Please make my deployment work"
author: ${{ github.actor }}
It can also go after a deployment step, for example as a small celebration when production has been updated successfully.
- name: Deploy
run: npm run deploy
- name: Celebrate with a candle
if: success()
uses: Napuh/light-a-candle@v1
with:
message: "Production deploy successful"
It is not an API
The Cathedral website was built for people to light candles, not for CI systems to do it continuously. The action sends a regular form request to a public endpoint, so it can stop working if the site changes its form or response behaviour. It is a small experiment, not infrastructure that should decide whether a deployment succeeds.
It should also be used sparingly. A candle before a release that matters is funny. Hundreds of them from a workflow are not.
Why I like these small projects
I like projects like this because even when they take a day, they make you look more closely at a technology you usually take for granted. GitHub Actions are everywhere, but it is easy to use them without thinking much about how they work.
Writing a toy action meant understanding what an action contains, how inputs and outputs are passed around, and what actually runs in CI. That was enough reason to make it.
