-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (50 loc) · 1.41 KB
/
notion.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Commit Notion changes
on:
workflow_dispatch:
inputs:
commit_message:
type: string
description: Commit message to use for this content build step
required: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
commit:
runs-on: ubuntu-24.04
env:
TZ: 'America/Los_Angeles'
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Run install
uses: borales/actions-yarn@v5
with:
cmd: install
- name: Run Notion script
uses: borales/actions-yarn@v5
env:
NOTION_SECRET: ${{ secrets.NOTION_SECRET }}
NOTION_DATABASE_ID: ${{ secrets.NOTION_DATABASE_ID }}
with:
cmd: notion-to-md
- name: Fix Formatting
uses: borales/actions-yarn@v5
with:
cmd: format:write
- name: Stage all changes
run: |
git add .
- name: Commit Changes
uses: planetscale/ghcommit-action@v0.1.33
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 }}