Page is under construction.
Check the github issues for ways to contribute! Or provide your feedback in this quick form
Check the github issues for ways to contribute! Or provide your feedback in this quick form
Automations & Workflows Guide
This guide documents all automation scripts, GitHub Actions workflows, n8n automations, and pre-commit hooks used in the Livepeer documentation repository.For a detailed audit of all automations, see the Automations & Workflows Audit Report.
Overview
The documentation repository uses multiple automation systems to keep content up-to-date, validate quality, and streamline workflows:- GitHub Actions - CI/CD workflows for testing, validation, and automated updates
- n8n Workflows - External automation platform for data fetching and content updates
- Scripts - Command-line tools for content generation, data fetching, and maintenance
- Pre-commit Hooks - Local validation to enforce style guide compliance
Intentional Duplication: Both GitHub Actions and n8n workflows exist for the same functionality (Ghost blog, Forum, YouTube data). This is intentional to provide flexibility for future maintainers. Use whichever platform you prefer based on your needs.
GitHub Actions Workflows
GitHub Actions workflows are located in.github/workflows/ and run automatically on pushes, pull requests, or scheduled intervals.
Active Workflows
Broken Links Check
File:.github/workflows/broken-links.yml
Purpose: Validates that all links in the documentation are working
Triggers:
- Pull requests to
mainbranch
- Installs Mintlify CLI
- Runs
mintlify broken-linksto check all links - Fails the PR if broken links are found
SDK Generation
File:.github/workflows/sdk_generation.yaml
Purpose: Automatically generates SDKs from OpenAPI specifications using Speakeasy
Triggers:
- Daily at midnight UTC (scheduled)
- Manual dispatch from GitHub Actions UI
- Uses Speakeasy SDK generation action
- Generates SDKs for all configured APIs
- Creates pull requests with generated code
- Go to Actions → SDK Generation
- Click “Run workflow”
- Optionally set
force: trueto regenerate even if no changes
SPEAKEASY_API_KEY- Speakeasy API key for SDK generation
Test V2 Pages
File:.github/workflows/test-v2-pages.yml
Purpose: Tests all v2 documentation pages for console errors and rendering issues
Triggers:
- Push to
mainordocs-v2-previewbranches - Pull requests to
mainordocs-v2-previewbranches
- Starts Mintlify dev server
- Runs Puppeteer tests on all pages
- Posts results as PR comments
- Uploads detailed test report as artifact
- PR comments with test results
- Artifact:
v2-page-test-report.json
Update Livepeer Release Version
File:.github/workflows/update-livepeer-release.yml
Purpose: Automatically updates the latest Livepeer release version in globals file
Triggers:
- Every 30 minutes (scheduled)
- Manual dispatch from GitHub Actions UI
- Fetches latest release from
livepeer/go-livepeerGitHub repository - Compares with current version in
snippets/automations/globals/globals.mdx - Updates file if new version is available
- Commits and pushes changes
- Go to Actions → Update Livepeer Release Version
- Click “Run workflow”
GITHUB_TOKEN)
Output file: snippets/automations/globals/globals.mdx
Data Fetching Workflows (GitHub Actions & n8n Available)
The following workflows have both GitHub Actions and n8n versions available. Both are maintained to provide flexibility - use whichever you prefer. GitHub Actions are simpler and repository-native, while n8n provides more robust workflows for complex integrations.Update Forum Data
File:.github/workflows/update-forum-data.yml
Status: ⚠️ Alternative to n8n - See note in workflow file
Purpose: Fetches latest forum topics from Livepeer forum
Triggers:
- Daily at midnight UTC (scheduled)
- Manual dispatch
- Runs
.github/scripts/fetch-forum-data.js - Updates
snippets/automations/forum/forumData.jsx - Commits and pushes if changes detected
DOCS_V2- GitHub token for docs repository access
Update Ghost Blog Data
File:.github/workflows/update-ghost-blog-data.yml
Status: ⚠️ Alternative to n8n - See note in workflow file
Purpose: Fetches latest blog posts from Ghost CMS
Triggers:
- Daily at midnight UTC (scheduled)
- Manual dispatch
- Runs
.github/scripts/fetch-ghost-blog-data.js - Updates
snippets/automations/blog/ghostBlogData.jsx - Commits and pushes if changes detected
DOCS_V2- GitHub token for docs repository access
Update YouTube Data
File:.github/workflows/update-youtube-data.yml
Status: ⚠️ Alternative to n8n - See note in workflow file
Purpose: Fetches latest YouTube videos from Livepeer channel
Triggers:
- Weekly on Sunday at midnight UTC (scheduled)
- Manual dispatch
- Fetches recent videos from YouTube API
- Filters out Shorts (≤60 seconds)
- Updates
snippets/automations/youtube/youtubeData.jsx - Commits and pushes if changes detected
YOUTUBE_API_KEY- YouTube Data API v3 key
n8n Automation Workflows
n8n workflows are JSON files located insnippets/automations/scripts/n8n/. These workflows run on an external n8n instance and can be imported/configured there.
Active n8n Workflows
Luma Events to Mintlify
File:snippets/automations/scripts/n8n/Luma-To-Mintlify.json
Status: ✅ Active
Purpose: Fetches Luma calendar events and updates documentation
Schedule: Weekly
What it does:
- Fetches iCal data from Luma API
- Parses events (upcoming and past)
- Generates JSX data file
- Commits to GitHub on
docs-v2-previewbranch
snippets/automations/luma/lumaEventsData.jsx
How to use:
- Import JSON file into n8n instance
- Configure GitHub credentials
- Set Luma calendar ID
- Activate workflow
- GitHub API token with write access
- Luma calendar ID:
cal-X93qV3PuUH0wq0f
Showcase Project Pipeline
File:snippets/automations/scripts/n8n/Showcase_To_Mintlify_Pipeline.json
Status: ✅ Active
Purpose: Handles showcase project submissions, approvals, and updates
Trigger: Google Sheets trigger (hourly polling)
What it does:
- Monitors Google Sheets for new project submissions
- Validates submission data
- Sends Discord notifications for approval
- Downloads media files from Google Drive
- Updates
snippets/automations/showcase/showcaseData.jsxwhen approved - Sends notifications to submitters
snippets/automations/showcase/showcaseData.jsx
How to use:
- Import JSON file into n8n instance
- Configure Google Sheets, Discord, and GitHub credentials
- Set up Google Form for submissions
- Activate workflow
- Google Sheets OAuth2
- Discord Bot API
- GitHub API token
- Google Drive OAuth2
- Google Form for project submissions
- Google Sheet for tracking submissions
- Discord server for approval workflow
Additional n8n Workflows (Alternative to GitHub Actions)
The following n8n workflows provide alternative implementations to GitHub Actions. Both are maintained for flexibility:- Ghost-to-Mintlify.json - Fetches Ghost blog posts (alternative to
update-ghost-blog-data.yml) - Forum-To-Mintlify-Latest-Topics.json - Fetches forum topics (alternative to
update-forum-data.yml) - YouTube-To-Mintlify.json - Fetches YouTube videos (alternative to
update-youtube-data.yml) - Discord_Announce_to_Mintlify.json - Fetches Discord announcements (n8n only - no GitHub Action equivalent)
Utility Workflows
MP4 to GIF Converter
File:snippets/automations/scripts/n8n/mp4-to-gif.json
Purpose: Converts MP4 videos to GIF format via webhook
Trigger: Webhook (POST request)
What it does:
- Accepts video URL or local path
- Downloads video (if URL provided)
- Converts to GIF using FFmpeg
- Returns GIF file or file path
- Import JSON file into n8n instance
- Configure webhook URL
- Send POST request with video URL or local path
- Receive GIF in response
video_url(optional) - URL to video filelocal_path(optional) - Local file pathfps(default: 10) - Frames per secondwidth(default: 480) - Output widthstart_time(default: “0”) - Start time in videoduration(optional) - Duration to convertoptimize(default: true) - Use palette optimizationoutput_path(optional) - Output file path
Scripts
Scripts are organized into several directories based on their purpose. All scripts use git-based repo root detection with fallback topaths.config.json.
Content Generation Scripts
Generate SEO Metadata
File:snippets/scripts/generate-seo.js
Purpose: Automatically generates and updates SEO metadata for MDX documentation pages
Usage:
- Scans all MDX files in
v2/pages/ - Generates
keywordsfrom file path, title, and description - Adds
og:imageusing domain-specific or default social preview images - Preserves existing SEO metadata (won’t overwrite if already present)
- After creating new documentation pages
- When updating page titles or descriptions
- Before deploying to improve SEO
Generate Documentation Status
File:snippets/scripts/generate-docs-status.js
Purpose: Generates documentation status tables and structure diagrams from docs.json
Usage:
- Reads
docs.jsonnavigation structure - Merges with
snippets/docs-status-data.jsonfor status/priority/notes - Outputs a status table MDX file
- Outputs a Mermaid structure diagram MDX file
snippets/generated/docs-status-table.mdx- Table of all pages with statussnippets/generated/docs-structure-diagram.mdx- Mermaid diagram of docs structure
- After modifying
docs.jsonnavigation - After updating page status in
snippets/docs-status-data.json
Generate API Documentation
File:snippets/scripts/generate-api-docs.sh
Purpose: Generates Mintlify API documentation from an OpenAPI specification file
Usage:
- Reads an OpenAPI spec (YAML or JSON)
- Creates a landing page with CardGroups linking to each endpoint (grouped by tags)
- Creates individual MDX pages for each endpoint with
openapi: METHOD /pathfrontmatter - Outputs a docs.json navigation snippet ready to copy-paste
docs.json navigation.
Update Component Library
File:snippets/scripts/update-component-library.sh
Purpose: Auto-generates the component library index page from the current snippets/components/ folder structure
Usage:
- Scans
snippets/components/directory structure - Generates a
<Tree>component with all folders and files - Updates
snippets/snippetsWiki/componentLibrary/index.mdx
snippets/snippetsWiki/componentLibrary/index.mdx between the AUTO-GENERATED comments.
When to run:
- After adding new components to
snippets/components/ - After reorganizing the components folder structure
- After renaming or deleting component files
Data Fetching Scripts
Fetch OpenAPI Specs
File:snippets/scripts/fetch-openapi-specs.sh
Purpose: Fetches OpenAPI specification files from the livepeer/ai-runner repository
Usage:
- Downloads OpenAPI specs from external repositories
- Saves to
ai/worker/api/
ai/worker/api/:
openapi.yaml- AI Runner API specgateway.openapi.yaml- AI Gateway API spec
Fetch External Documentation
File:snippets/scripts/fetch-external-docs.sh
Purpose: Fetches external documentation files from other Livepeer repositories and sanitizes them for MDX compatibility
Usage:
- Downloads documentation from external repositories
- Sanitizes content for MDX compatibility
- Saves to
snippets/external/
snippets/external/:
wiki-readme.mdx- livepeer/wiki READMEawesome-livepeer-readme.mdx- livepeer/awesome-livepeer READMEwhitepaper.mdx- Livepeer Whitepapergwid-readme.mdx- videoDAC/livepeer-gateway READMEbox-additional-config.mdx- go-livepeer box configuration
- Escaping curly braces for MDX
- Removing HTML comments
- Converting HTML tags to Markdown equivalents
Fetch LPT Exchanges
File:snippets/scripts/fetch-lpt-exchanges.sh
Purpose: Fetches LPT exchange listings from CoinGecko API and updates the exchanges page
Usage:
- Fetches live data from CoinGecko API for Livepeer token
- Generates a styled table of CEX exchanges with volume and trust scores
- Appends DEX information and contract addresses
- Updates
v2/pages/06_delegators/token-resources/lpt-exchanges.mdx
- Periodically to update exchange listings
- Before major releases to ensure current data
Testing Scripts
Test V2 Pages
File:scripts/test-v2-pages.js
Purpose: Tests all v2 pages for console errors and rendering issues
Usage:
- Extracts all v2 pages from
docs.json - Starts Mintlify dev server (if not running)
- Tests each page with Puppeteer
- Reports console errors, page errors, and request failures
- Generates detailed JSON report
mint devmust be running (or setMINT_BASE_URLenvironment variable)- Puppeteer installed (
npm install)
- Console output with pass/fail status
v2-page-test-report.json- Detailed test results
MINT_BASE_URL- Base URL for Mintlify dev server (default:http://localhost:3000)
GitHub Scripts (Used by Workflows)
These scripts are used by GitHub Actions workflows and typically shouldn’t be run manually:.github/scripts/fetch-forum-data.js- Fetches forum data (used byupdate-forum-data.yml).github/scripts/fetch-ghost-blog-data.js- Fetches Ghost blog data (used byupdate-ghost-blog-data.yml).github/scripts/fetch-youtube-data.js- Fetches YouTube data (not currently used by workflow)
Pre-commit Hooks
Pre-commit hooks automatically run when you attempt to commit code. They enforce style guide compliance and validate code quality.Installation
MANDATORY: You must install the hooks before making any commits:What Gets Checked
Style Guide Compliance
The pre-commit hook checks for:- ❌ ThemeData usage - Blocks deprecated
ThemeDataimports fromthemeStyles.jsx - ❌ Hardcoded colors - Warns about hex colors that should use CSS Custom Properties
- ⚠️ Relative imports - Warns about relative paths (should use absolute paths from root)
- ⚠️ @mintlify/components imports - Warns about unnecessary imports (components are global)
- ⚠️ React hook imports - Warns about unnecessary React imports (hooks are global)
Verification Scripts
The hook also runs.githooks/verify.sh which checks:
- ✅ MDX syntax - Validates frontmatter and basic MDX structure
- ✅ JSON syntax - Validates JSON files are parseable
- ✅ Shell script syntax - Validates shell scripts with
bash -n - ✅ JavaScript syntax - Validates JS files with
node --check - ✅ Mintlify config - Validates
docs.json/mint.jsonsyntax - ✅ Import paths - Ensures snippets imports use absolute paths
- ✅ Browser validation - Tests MDX files in headless browser (if
mint devis running)
What Happens on Violation
If you attempt to commit code that violates the style guide:- The commit is blocked
- You receive a detailed error message listing all violations
- You must fix the violations before committing again
Browser Validation
The hooks include headless browser validation that tests MDX files actually render in the browser. This catches:- Runtime errors in components
- Failed imports
- Console errors
- Render failures
mint dev to be running. If it’s not running, the check is skipped (doesn’t block commit).
Bypassing Hooks (Not Recommended)
⚠️ WARNING: Only bypass hooks if you have a legitimate reason and understand the consequences.- Violates style guide compliance
- May introduce errors that break the build
- Makes code review harder
- Can cause issues for other developers
Running Automations
Manual Execution
GitHub Actions
- Go to Actions tab in GitHub repository
- Select the workflow you want to run
- Click “Run workflow” button
- Select branch and any required inputs
- Click “Run workflow” to start
Scripts
Most scripts can be run directly from the command line:n8n Workflows
- Import JSON file into n8n instance
- Configure credentials and settings
- Activate workflow
- Monitor executions in n8n dashboard
Scheduled Execution
- GitHub Actions - Use
scheduletrigger with cron syntax - n8n Workflows - Use Schedule Trigger node with interval or cron
Monitoring
- GitHub Actions - Check Actions tab for workflow runs and logs
- n8n - Check n8n dashboard for execution history
- Scripts - Check console output and generated files
Troubleshooting
GitHub Actions Not Running
Issue: Workflow doesn’t trigger on push/PR Solutions:- Check workflow file syntax (YAML must be valid)
- Verify trigger conditions match your branch/event
- Check Actions tab for error messages
- Ensure workflow file is in
.github/workflows/directory
Scripts Failing
Issue: Script errors or doesn’t produce expected output Solutions:- Check script has execute permissions:
chmod +x script.sh - Verify Node.js version matches script requirements
- Check for missing dependencies:
npm install - Review script documentation for prerequisites
- Run with verbose output if available
Pre-commit Hook Not Running
Issue: Hook doesn’t execute on commit Solutions:- Verify hook is installed:
ls -la .git/hooks/pre-commit - Check hook is executable:
chmod +x .git/hooks/pre-commit - Reinstall:
./.githooks/install.sh - Check for
.git/hooks/pre-commitfile exists
n8n Workflow Issues
Issue: Workflow fails or doesn’t update files Solutions:- Check workflow is active in n8n dashboard
- Verify credentials are configured correctly
- Check execution logs in n8n
- Verify GitHub token has write permissions
- Check branch name matches workflow configuration
Missing Secrets/Keys
Issue: Workflow fails with authentication errors Solutions:- Go to repository Settings → Secrets and variables → Actions
- Add required secrets (e.g.,
YOUTUBE_API_KEY,SPEAKEASY_API_KEY) - Verify secret names match workflow file exactly
- For n8n, configure credentials in n8n dashboard
Best Practices
When to Use What
GitHub Actions - Use for:- ✅ Simple data fetching (API calls, file updates)
- ✅ Repository-native operations (commits, PRs, checks)
- ✅ CI/CD workflows (testing, validation)
- ✅ Scheduled tasks that only need GitHub access
- ✅ When you want everything in the repository
- ✅ Complex multi-step workflows
- ✅ External service integrations (Discord, Google Sheets, Google Forms)
- ✅ Approval workflows with notifications
- ✅ Workflows requiring user interaction
- ✅ When you need more visual workflow management
- ✅ One-off tasks and content generation
- ✅ Local development and testing
- ✅ Manual data updates
- ✅ Enforcing code quality and style guide compliance
- ✅ Catching errors before commit
Keeping Automations Updated
- Review audit reports - Check
docs/PLAN/reports/for automation status - Test before deploying - Run scripts locally before committing
- Monitor workflow runs - Check GitHub Actions and n8n dashboards regularly
- Update documentation - Keep this guide current as automations change
Security Considerations
- Never commit secrets - Use GitHub Secrets or n8n credentials
- Review auto-commits - Be cautious with scripts that automatically commit
- Limit token permissions - Use least-privilege access for API tokens
- Audit regularly - Review automation access and permissions periodically
Related Documentation
- Style Guide - Styling conventions and Mintlify gotchas
- Component Library - Available components and usage
- Git Hooks Documentation - Complete pre-commit hook documentation
- Scripts README - Detailed scripts documentation
- Automations README - Automation overview
- Audit Report - Comprehensive automation audit
Getting Help
If you encounter issues with automations:- Check this guide for troubleshooting steps
- Review the audit report for known issues
- Check workflow/script documentation
- Review execution logs (GitHub Actions or n8n)
- Ask in the repository or community channels