Skip to content

Fetch and commit Notion changes #13

Fetch and commit Notion changes

Fetch and commit Notion changes #13

Workflow file for this run

name: Notion and commit changes
on:
workflow_dispatch:
inputs:
commit_message:
type: string
description: Commit message to use for this content build step
required: false
jobs:
notion_and_deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "latest"
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install
- name: Run Notion script
env:
NOTION_SECRET: ${{ secrets.NOTION_SECRET }}
run: |
node index.js
git add .
- name: Commit Changes
uses: planetscale/[email protected]
with:
commit_message: ${{ github.event.inputs.commit_message || 'Update from Notion' }}
repo: ${{ github.repository }}
branch: ${{ github.head_ref || github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}