This README itself is a demo for this action. The Project GitHub Repo is in sync with the Telegraph Page.
md-to-telegraph-action is a GitHub action that automatically converts markdown files in your repository to pages on Telegraph. It is a convenient way to host your documentation on Telegraph without the hassle of setting up a server.
Check it out in Marketplace: Markdown to Telegraph Action
- 🚀 Converts markdown files to Telegraph pages automatically
- 📝 Supports most markdown syntax (headers, bold, italic, links, code blocks, etc.)
- 🔗 Resolves internal markdown links between files automatically
- 📖 Automatically extracts page titles from H1 headers
- 🔄 Tracks file changes and only updates modified files
- 📋 Maintains a mapping file of all created pages
- ⚙️ Configurable file patterns for inclusion/exclusion
- 🎯 Uses existing Telegraph account or creates a new one
- 🔀 One Entry Mode: Automatically updates repository homepage URL with Telegraph URL when only one page is created
- 🔄 Page Replacement: Reuse existing Telegraph pages instead of creating new ones (maintains same URLs)
name: Convert Docs to Telegraph
on:
push:
branches: [main]
paths: ["docs/**/*.md"]
jobs:
convert-to-telegraph:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache Telegraph mappings
uses: actions/cache@v3
with:
path: telegraph-pages.json
key: telegraph-mappings-${{ hashFiles('docs/**/*.md') }}
- uses: cyanxiao/md-to-telegraph-action@release
with:
account-name: "My Docs Site"
author-name: "Documentation Team"
include-patterns: "docs/**/*.md"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}For detailed usage instructions, configuration options, and advanced features, see:
- Usage Guide - Complete configuration examples and input/output reference
- Features - Detailed documentation for One Entry Mode, Page Replacement, and Internal Link Resolution
- Development - Setup, testing, and contribution guidelines
- E2E Markdown Test - Comprehensive Markdown syntax test document showcasing all supported features