Simple deploy script based on a webhook for my website reboot.li
- TypeScript 85.3%
- Dockerfile 14.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| config.example.json | ||
| config.json | ||
| deno.json | ||
| deno.lock | ||
| docker-compose-example.yml | ||
| Dockerfile | ||
| main.ts | ||
| README.md | ||
reboot.li-webhook
A lightweight Deno-based webhook listener for auto-deploying the reboot.li static site.
How it works
This service listens for POST requests (webhooks) from Forgejo/Gitea. When a push to the main branch is detected, it:
- Performs a
git pullin the target project directory. - Runs
deno task buildin the target project directory.
Setup
- Configure the environment variables in
docker-compose.yml(copy fromdocker-compose-example.yml):PORT: The port to listen on (default: 8080).WEBHOOK_SECRET: The secret token for verification (matchesX-Gitea-Token).REPO_URL: The URL to clone the repository from if the project directory is empty.PROJECT_PATH: The path to the project directory inside the container.
- Ensure the volume mapping in
docker-compose.ymlpoints to your deployment directory on the host. - Run
docker compose up -d --build.
Forgejo Configuration
- Target URL:
http://your-server-ip:8080 - HTTP Method: POST
- Secret: Your
WEBHOOK_SECRET - Trigger: Push Events (main branch)