Skip to content
arrow-down

GitHub Action

@narkdown/awesome-reading-list

v0.1.0 Latest version

@narkdown/awesome-reading-list

arrow-down

@narkdown/awesome-reading-list

Get parsed rows of Notion database

Installation

Copy and paste the following snippet into your .yml file.

              

- name: @narkdown/awesome-reading-list

uses: narkdown/[email protected]

Learn more about this action in narkdown/awesome-reading-list

Choose a version

@narkdown/awesome-reading-list Awesome

GitHub Action: View on Marketplace CI GitHub version license: MIT

Create your own Awesome Reading List sync with Notion Database!

Notion to Github

Demo

Setup

Prep work

  1. Duplicate this Notion database template.
  2. Create a Notion Account.
  3. Create a Notion API integration & Get Token.
  4. Share a database with your integration.
  5. Create a new public GitHub Gist.
  6. Create a token with the gist scope and copy it.

Project setup

  1. Use this repository template.

  2. Go to the repo Settings > Secrets

  3. Add the following environment variables:

    • NOTION_API_TOKEN: The Notion token generated above.

    • NOTION_DATABASE_URL: The Notion database url duplicated above.

    • GIST_ID: The ID of the gist you created above

      https://gist.github.com/username/287da0b33fc7d5b5848944f90f3600b7
                                       |----------- Gist ID ----------|
      
    • GIST_TOKEN: The GitHub token generated above.

  4. Your awesome reading list will be deployed at 00:00 AM (UTC) on everyday. You can trigger action manually.

  5. Add your reading list to Notion database. You can use extensions like Notion Web Clipper or Save to Notion.

Customize

If you want to generate your own markdown using Notion Database data, you can customize template.

  1. Modify templates/default-template.md or Create new template file.
  2. npm install && npm run build
  3. Change narkdown/awesome-reading-list@main to {your username}/awesome-reading-list@main in .github/workflows/CI.yml

Inputs

notion_api_token

Required Notion API Key. How to get Notion API Key

notion_database_url

Required Notion Database URL.

gist_token

Required Personal access token for updating gist.

gist_id

Required Id of the gist to be updated.

Show advanced input options

file_name

Name of the file to be deployed on gist.

Default awesome-reading-list.md

template_name

EJS template file path.

Default default-template.md

date-option-timezone

Timezone ID used to parse date properties.

Default Asia/Seoul

date-option-format

Date formatting rules used to parse data properties.

Default yyyy-MM-dd HH:mm:ss

sort-option-timestamp

Database query sorting criteria. created_time | last_edited_time

Default created_time

sort-option-direction

Database query sorting direction. ascending | descending

Default descending

Example workflow

Related

License

MIT