Import Notion Docs and create PR #4
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@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14.18.0' | |
cache: 'yarn' | |
- 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' |