Skip to content
refresh-cw

GitHub Action

Sync Github Commit to Notion

1.0.2 Latest version

Sync Github Commit to Notion

refresh-cw

Sync Github Commit to Notion

Sync your commits to Notion

Installation

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

              

- name: Sync Github Commit to Notion

uses: marlisumarli/[email protected]

Learn more about this action in marlisumarli/sync-github-to-notion

Choose a version

Sync Github Commit to Notion

This action reference from alessandrobelli/NotionHook


Setup

  1. Create a new private Notion integration here: https://www.notion.so/my-integrations.

  2. Copy the "Internal Integration Token" and create a new Repository secret called NOTION_SECRET.

    1. Go to repository Settings.

    2. Select Secrets and variables, on the drop-down select Actions.

    3. Click button New repository secret .

    4. And paste your Internal Integration Token.

      Action Secret Repository Github

  3. You need to create a new Notion Database that looks like this, or just duplicate this.

  4. Connect page to Github

    1. Select the menu in the top right corner.

      Add Connections

    2. Select Add Connection and choose Sync Github

  5. Navigate to your Notion database in a browser and get the Database Id and copy.

    Copy Database ID

  6. Create a new Repository secret for NOTION_DATABASE, the same way as number 2.

  7. Create yaml file in directory .github/workflows/main.yml on your porject.

    1. Like this

      Workflow Directory

    2. Copy this and paste it in main.yml

      on: [push]
      
      jobs:
        build-node:
          runs-on: ubuntu-latest
          name: Sync commits to Notion
          steps:
            - name: Sync Github Commit to Notion
              id: notion-sync-commit
              uses: marlisumarli/[email protected]
              with:
                notion_secret: ${{ secrets.NOTION_SECRET }}
                notion_database: ${{ secrets.NOTION_DATABASE }}
                branch: ${{ github.ref_name }}