-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathaction.yml
53 lines (52 loc) · 1.77 KB
/
action.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
name: 'notion-blog-action'
description: |
将 notion database 中的 page 转换为 markdown 文档,可以用于 hexo、hugo 等静态博客构建
支持自动将图片迁移到 aliyun oss
inputs:
token: # id of input
description: notion app token,建议最好放到 Action Secret 中
required: true
database_id:
required: true
description: |
notion 中的数据库 id
- 假设你的数据库页面链接是 `https://www.notion.so/you-name/0f3d856498ca4db3b457c5b4eeaxxxxx`
- 那么 `database_id=0f3d856498ca4db3b457c5b4eeaxxxxx`
status_name:
description: notion database 状态字段的字段名,支持自定义
default: "status"
status_published:
description: notion database 文章已发布状态的字段值
default: "已发布"
status_unpublish:
description: |
notion database 文章待发布状态的字段值
触发 action 后会自动拉去所有该状态的文章,成功导出之后会把这篇文章的状态修改为上面设置的已发布状态
default: "待发布"
migrate_image:
description: |
是否迁移图片到 aliyun oss
注意: 如果不迁移图片默认导出图片链接是 notion 的自带链接,有访问时效
目前支持迁移图片到 aliyun oss 中
default: "true"
output:
required: false
description: 输出的文件夹路径
access_key_id:
description: aliyun access_key_id
required: true
access_key_secret:
description: aliyun access_key_secret
required: true
bucket:
description: aliyun bucket
required: true
area:
description: "aliyun area: oss-cn-hangzhou"
required: true
default: oss-cn-hangzhou
prefix:
description: "file dir, e.g. image/"
runs:
using: 'node16'
main: 'dist/index.js'