Skip to content
This repository was archived by the owner on Nov 14, 2021. It is now read-only.

feat: Use narkdown cli and config #1

Merged
merged 14 commits into from
Dec 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/notion2github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Notion2Github
on:
schedule:
- cron: "0 14 * * *"
jobs:
automatic-syncronization-from-notion-to-github:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Notion2Github
uses: ./
with:
database-url: "https://www.notion.so/acc3dfd0339e4cacb5baae8673fddfad"
env:
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}

- name: Format documents
uses: creyD/prettier_action@v3.1
with:
prettier_options: --write ./docs/**/*.md
commit_message: "docs: Update docs (auto)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LABEL "maintainer"="Younho Choo <younho9.choo@gmail.com>"

WORKDIR /usr/src/app

COPY requirements.txt main.py narkdown.config.json ./
COPY requirements.txt main.py $GITHUB_WORKSPACE/narkdown.config.json* ./

RUN pip install -r requirements.txt

Expand Down
20 changes: 20 additions & 0 deletions narkdown.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"exportConfig": {
"docsDirectory": "./docs/v1.2.1/",
"recursiveExport": true,
"createPageDirectory": true,
"addMetadata": false,
"lowerPathname": true,
"lowerFilename": true,
"lineBreak": false
},
"databaseConfig": {
"categoryColumnName": "Category",
"tagsColumnName": "Tags",
"createdTimeColumnName": "Created Time",
"statusColumnName": "Status",
"currentStatus": "✅ Completed",
"nextStatus": "🖨 Published",
"filters": {}
}
}