-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.01 KB
/
pages-deploy.yml
File metadata and controls
45 lines (37 loc) · 1.01 KB
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
name: "Update README from Notion"
on:
repository_dispatch:
types: [RUN_WORKFLOW_DISPATCH]
permissions:
contents: write
pages: write
id-token: write
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Clean Directory
run: |
for file in assets/img/*
do
rm -rf "$file"
done
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "18.2"
- run: npm install
- name: Run Notion Import Script
run: node notion-import.js
env:
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
DATABASE_ID: ${{ secrets.DATABASE_ID }}
- name: Commit README
uses: stefanzweifel/git-auto-commit-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit_message: "Update README from Notion"
branch: main
commit_user_name: "Notion-to-Github-Bot"