{"id":13489787,"url":"https://github.com/narkdown/notion2github","last_synced_at":"2025-03-28T05:31:19.790Z","repository":{"id":56012497,"uuid":"316881588","full_name":"narkdown/notion2github","owner":"narkdown","description":"Automatic syncronization from Notion to Github","archived":true,"fork":false,"pushed_at":"2021-03-28T02:41:54.000Z","size":150,"stargazers_count":70,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-03-14T08:31:03.986Z","etag":null,"topics":["cms","narkdown","notion"],"latest_commit_sha":null,"homepage":"https://narkdown.notion.site/Notion2Github-en-6066b635cce74ce6ae9e95d9345ccf2c","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/narkdown.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-29T05:17:53.000Z","updated_at":"2024-02-04T17:13:41.000Z","dependencies_parsed_at":"2023-01-05T05:01:37.564Z","dependency_job_id":null,"html_url":"https://github.com/narkdown/notion2github","commit_stats":{"total_commits":40,"total_committers":1,"mean_commits":40.0,"dds":0.0,"last_synced_commit":"8090143207848670f86430c3f29dc217782ed0c4"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narkdown%2Fnotion2github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narkdown%2Fnotion2github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narkdown%2Fnotion2github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narkdown%2Fnotion2github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/narkdown","download_url":"https://codeload.github.com/narkdown/notion2github/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245978200,"owners_count":20703675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cms","narkdown","notion"],"created_at":"2024-07-31T19:00:35.117Z","updated_at":"2025-03-28T05:31:18.194Z","avatar_url":"https://github.com/narkdown.png","language":"Dockerfile","funding_links":[],"categories":["Dockerfile","HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"\u003ca align=\"left\" href=\"https://www.notion.so/Notion2Github-91cf062b276b41cdb78a75672ba31cb3\"\u003e\u003cimg src=\"docs/images/logo.png\" alt=\"Notion2Github\" width=\"120px\"\u003e\u003c/a\u003e\n\n# Notion2Github\n\n[![GitHub Action: View on Marketplace](https://img.shields.io/badge/GitHub%20Action-View_on_Marketplace-blue?style=flat-square\u0026logo=github)](https://github.com/marketplace/actions/notion2github)\n[![Demo: available](https://img.shields.io/badge/Demo-available-orange?style=flat-square)](.github/workflows/notion2github.yml)\n[![Version: v1.0.1](https://img.shields.io/badge/Version-v1.0.1-brightgreen?style=flat-square)](https://github.com/younho9/notion2github/releases/tag/v1.0.1)\n[![license: MIT](https://img.shields.io/badge/license-MIT-yellow.svg?style=flat-square)](./LICENSE)\n\n| [English](/README.md) | [한국어](/docs/README.ko.md) |\n\n**Automatic syncronization from Notion to Github**\n\n---\n\n\u003e ⚠️ **NOTE:** Narkdown is dependent on [notion-py](https://github.com/jamalex/notion-py), the **_unofficial_** Notion API created by [Jamie Alexandre](https://github.com/jamalex).\n\u003e It can not gurantee it will stay stable. If you need to use in production, I recommend waiting for their official release.\n\n---\n\n## Usage\n\n### Quick Start\n\n1. Go to `github.com/{your_id}/{your_repo}/settings/secrets/actions`\n\n2. Set `token_v2` of Notion to your repository secret.\n\n   ![notion2github-image-0](docs/images/readme-image-0.png)\n\n   [How To Find Your Notion v2 Token - Red Gregory](https://www.redgregory.com/notion/2020/6/15/9zuzav95gwzwewdu1dspweqbv481s5)\n\n   [Encrypted secrets](https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets#using-encrypted-secrets-in-a-workflow)\n\n3. Create a workflow in `.github/workflows/**.yml` of your repository\n\nHere are examples.\n\n### Example Workflow\n\n#### Example 1 (run on push \u0026 pull request in main)\n\n```yaml\nname: Notion2Github\non:\n  pull_request:\n  push:\n    branches:\n      - main\njobs:\n  auto-sync-from-notion-to-github:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v2\n\n      - name: Notion2Github\n        uses: younho9/notion2github@v1.1.0\n        with:\n          database-url: 'https://www.notion.so/acc3dfd0339e4cacb5baae8673fddfad'\n          docs-directory: docs\n        env:\n          NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}\n\n      - name: Format documents\n        uses: creyD/prettier_action@v3.1\n        with:\n          prettier_options: --write ./docs/**/*.md\n          commit_message: 'docs: Update docs (auto)'\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n#### Example 2 (scheduled)\n\n```yaml\nname: Notion2Github\non:\n  schedule:\n    - cron: '0 14 * * *'\njobs:\n  auto-sync-from-notion-to-github:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v2\n\n      - name: Notion2Github\n        uses: younho9/notion2github@v1.1.0\n        with:\n          database-url: 'https://www.notion.so/acc3dfd0339e4cacb5baae8673fddfad'\n          docs-directory: docs\n        env:\n          NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}\n\n      - name: Format documents\n        uses: creyD/prettier_action@v3.1\n        with:\n          prettier_options: --write ./docs/**/*.md\n          commit_message: 'docs: Update docs (auto)'\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n\u003e [Useful site for crontab setting](https://crontab.guru/)\n\n### Live examples\n\n- [younho9/narkdown](https://github.com/younho9/narkdown/blob/main/.github/workflows/notion2github.yml)\n\n- [younho9/TIL](https://github.com/younho9/til/blob/main/.github/workflows/notion2github.yml)\n\n## Database template page for test\n\nHere is an [database template page](https://www.notion.so/acc3dfd0339e4cacb5baae8673fddfad?v=be43c1c8dd644cfb9df9efd97d8af60a) for importing pages from the database. Move to that page, duplicate it, and test it.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"80%\" src=\"docs/images/readme-image-1.png\" alt=\"notion2github-image-1\"\u003e\n\u003c/div\u003e\n\n## Configuration\n\n### Parameters\n\n| Name             | Description                                                    | Required   | Default  |\n| ---------------- | -------------------------------------------------------------- | ---------- | -------- |\n| `database-url`   | URL of the Notion database to extract.                         | `required` |          |\n| `docs-directory` | Directory in which the Notion pages to extract will be stored. |            | `\"docs\"` |\n| `filter-prop`    | Property of the filter to apply to the notion database.        |            | `\"\"`     |\n| `filter-value`   | Value of the filter to apply to the notion database.           |            | `\"\"`     |\n\n### Configuring Narkdown\n\nNarkdown provides some configuration for how to extract documents. You can configure Narkdown via `narkdown.config.json` .\n\nCreate `narkdown.config.json` in root directory of your repository.\n\nFor more information on configure your environment, [see the document in Nakdown](https://github.com/younho9/narkdown#configuring-narkdown).\n\n```json\n// narkdown.config.json\n{\n  \"exportConfig\": {\n    \"recursiveExport\": true,\n    \"createPageDirectory\": true,\n    \"addMetadata\": true,\n    \"appendCreatedTime\": true,\n    \"generateSlug\": true\n  },\n  \"databaseConfig\": {\n    \"categoryColumnName\": \"Category\",\n    \"statusColumnName\": \"Status\",\n    \"currentStatus\": \"✅ Completed\",\n    \"nextStatus\": \"🖨 Published\"\n  }\n}\n```\n\n### Used in combination with other actions\n\nNotion2Github is a step in the workflow, just import the contents of notion to a running virtual machine in github action.\n\nThere are great actions to commit the imported content to your repository.\n\n- [Git Auto Commit - GitHub Marketplace](https://github.com/marketplace/actions/git-auto-commit)\n\n- [Prettier Action - GitHub Marketplace](https://github.com/marketplace/actions/prettier-action)\n\n### License\n\nMIT © [younho9](https://github.com/younho9)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarkdown%2Fnotion2github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnarkdown%2Fnotion2github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarkdown%2Fnotion2github/lists"}