diff --git a/.github/workflows/notion2github.yml b/.github/workflows/notion2github.yml new file mode 100644 index 0000000..75689aa --- /dev/null +++ b/.github/workflows/notion2github.yml @@ -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 }} diff --git a/Dockerfile b/Dockerfile index dbdaf67..f6c247f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ LABEL "maintainer"="Younho Choo " 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 diff --git a/narkdown.config.json b/narkdown.config.json new file mode 100644 index 0000000..26303c3 --- /dev/null +++ b/narkdown.config.json @@ -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": {} + } +}