niechen / gallery-fake

Sync GitHub markdown docs to Notion DB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gallery Fake is a GitHub Actions for sync markdown docs to Notion DB.

Usage

  1. Create Notion Integration.
  2. Set env NOTION_API_TOKEN, NOTION_DB_ID, GITHUB_MD_PATH in your GitHub repository.
  3. Create workflow yaml.
name: Sync markdown To Notion DB

on:
  workflow_dispatch:
  schedule:
    - cron: "00 * * * *"

jobs:
  sync:
    name: Sync
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Gallery Fake
        uses: litencatt/gallery-fake@v0.4.0
        env:
          NOTION_API_TOKEN: ${{ secrets.NOTION_API_TOKEN }}
          NOTION_DB_ID: ${{ secrets.NOTION_DB_ID }}
          GITHUB_MD_PATH: "path/to/sync_dir"

Settings example

Set like this, if you sync ./example dir in your repository.

GITHUB_MD_PATH: "example"

Sync like this, after actions executed. image

Open example1.md page image

About

Sync GitHub markdown docs to Notion DB

License:MIT License


Languages

Language:TypeScript 95.2%Language:Dockerfile 2.9%Language:Makefile 1.9%