π CI/CD Integration
Use Rotkeeper in CI/CD to auto-render, pack, and verify your markdown tombs on every commit, schedule, or push.
Rotkeeper automates file decay and HTML rendering for flat-file sites. While itβs built for local rituals, it works smoothly in modern automation setups. This guide shows how to run Rotkeeper in CI/CD pipelines using GitHub Actions, Bash loops, or cron-based scheduling.
These examples assume your repository includes all Rotkeeper
scripts in bones/scripts/ and that
rotkeeper.sh is set as your CLI entrypoint.
A typical pipeline performs these steps in order: - Initialize or
expand the content tree - Render HTML tombs from Markdown - Generate a
.tar.gz archive of the output - Log actions to
bones/logs/
βοΈ Minimal GitHub Actions Example
name: Build & Tomb
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout rot
uses: actions/checkout@v3
- name: Install deps
run: sudo apt-get install pandoc
- name: Execute Rotkeeper pipeline
run: |
chmod +x ./rotkeeper
./rotkeeper init
./rotkeeper assets
./rotkeeper render
./rotkeeper pack
- name: Archive tomb
uses: actions/upload-artifact@v3
with:
name: tomb-archive
path: ./tomb-*.tar.gzπ§ͺ Bash CI Example
If youβre using plain shell:
#!/bin/bash
set -e
./rotkeeper init
./rotkeeper assets
./rotkeeper render
./rotkeeper pack
if [ -f tomb-*.tar.gz ]; then
echo "β
Tomb sealed."
else
echo "β No tomb found."
exit 1
fiπ Cron Scheduling Example
To automate tomb generation weekly:
0 3 * * 1 /path/to/rotkeeper all >> /var/log/rotkeeper.log 2>&1- Runs every Monday at 3:00 AM
- Appends stdout/stderr to
/var/log/rotkeeper.log - Assumes
rotkeeper allhandles init β render β pack
If you prefer more control, replace all with:
./rotkeeper init && ./rotkeeper render && ./rotkeeper packπ§ Checklist for Smooth CI Rituals
- β
Ensure
rotkeeperis executable:chmod +x rotkeeper - πͺ΅ Inspect
bones/logs/after every run - π« Add
tomb-*.tar.gzto.gitignoreif you donβt archive outputs in Git
π¦ Expected Output
Expect these outputs after each CI run:
- β
Rendered HTML in
/output/ - π¦ Archive in
bones/archive/tomb-YYYY-MM-DD_HHMM.tar.gz - πͺ΅ Log entry in
bones/logs/rc-pack-*.log - π§Ύ Optional: JSON export of all markdown tombs if
pandocandjqare installed
π Full Ritual Pipeline (Manual or CI)
To run every major step in order, use:
./rotkeeper init
./rotkeeper expand
./rotkeeper render
./rotkeeper assets
./rotkeeper pack
./rotkeeper bless
./rotkeeper verify
./rotkeeper statusAdd or remove steps depending on your tomb cycle or validation needs.
Back to Troubleshooting FAQ Continue to Advanced Usage