Import Notion Docs and create PR #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Import Notion Docs and create PR | |
on: | |
workflow_dispatch: | |
jobs: | |
auto-sync-from-notion-to-github: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.0.0' | |
cache: 'yarn' | |
- name: Enable Corepack | |
run: corepack enable | |
- name: Yarn Install | |
run: yarn install | |
- name: Import Notion Docs | |
run: NOTION_TOKEN=${{ secrets.TOKEN_NOTION }} yarn import-notion-docs | |
- name: Update folder permissions | |
run: sudo chown -R $USER:$USER . | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: Notion - Update docs | |
committer: GitHub <[email protected]> | |
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
signoff: false | |
branch: notion-update-docs | |
delete-branch: false | |
title: '[Notion] Update docs' |