πŸ” CI/CD Integration

πŸ” 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

If you prefer more control, replace all with:

./rotkeeper init && ./rotkeeper render && ./rotkeeper pack

🧠 Checklist for Smooth CI Rituals


πŸ“¦ Expected Output

Expect these outputs after each CI run:


πŸ” 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 status

Add or remove steps depending on your tomb cycle or validation needs.


Back to Troubleshooting FAQ Continue to Advanced Usage

Author:

Project: Rotkeeper

Version: 0.2.3-pre

License: