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

Commit c902fa5

Browse files
authored
feat: Use narkdown cli and config (#1)
* feat: Add notion2github workflow * chore: Add narkdown config * docs: Update docs (auto) * feat: Copy narkdown config from workspace * chore: Rename job and step * feat: Use github workspace env * test: Docker conditional copy * docs: Update docs (auto) * test: Test config file present * docs: Remove docs * chore: Update database url * chore: Update narkdown config * feat: Update notion2github trigger * chore: Remove useless command from dockerfile Co-authored-by: younho9 <younho9@users.noreply.github.com>
1 parent 41f28c1 commit c902fa5

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

.github/workflows/notion2github.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Notion2Github
2+
on:
3+
schedule:
4+
- cron: "0 14 * * *"
5+
jobs:
6+
automatic-syncronization-from-notion-to-github:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout code
10+
uses: actions/checkout@v2
11+
12+
- name: Notion2Github
13+
uses: ./
14+
with:
15+
database-url: "https://www.notion.so/acc3dfd0339e4cacb5baae8673fddfad"
16+
env:
17+
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
18+
19+
- name: Format documents
20+
uses: creyD/prettier_action@v3.1
21+
with:
22+
prettier_options: --write ./docs/**/*.md
23+
commit_message: "docs: Update docs (auto)"
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LABEL "maintainer"="Younho Choo <younho9.choo@gmail.com>"
77

88
WORKDIR /usr/src/app
99

10-
COPY requirements.txt main.py narkdown.config.json ./
10+
COPY requirements.txt main.py $GITHUB_WORKSPACE/narkdown.config.json* ./
1111

1212
RUN pip install -r requirements.txt
1313

narkdown.config.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"exportConfig": {
3+
"docsDirectory": "./docs/v1.2.1/",
4+
"recursiveExport": true,
5+
"createPageDirectory": true,
6+
"addMetadata": false,
7+
"lowerPathname": true,
8+
"lowerFilename": true,
9+
"lineBreak": false
10+
},
11+
"databaseConfig": {
12+
"categoryColumnName": "Category",
13+
"tagsColumnName": "Tags",
14+
"createdTimeColumnName": "Created Time",
15+
"statusColumnName": "Status",
16+
"currentStatus": "✅ Completed",
17+
"nextStatus": "🖨 Published",
18+
"filters": {}
19+
}
20+
}

0 commit comments

Comments
 (0)