-
Notifications
You must be signed in to change notification settings - Fork 50
50 lines (44 loc) · 1.11 KB
/
sync-post.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
name: Sync Post
# Controls when the workflow will run
on:
# schedule:
# - cron: "30 1 * * *"
# https://docs.github.com/cn/developers/webhooks-and-events/events/issue-event-types
issues:
types:
- opened
- closed
- renamed
- labeled
- unlabeled
- reopened
- committed # 修改?
workflow_dispatch:
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_USER: ${{ secrets.GH_USER }}
GH_PROJECT_NAME: ${{ secrets.GH_PROJECT_NAME }}
jobs:
Publish:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
- name: Git config 🔧
run: |
git config --global user.name "giscafer"
git config --global user.email "giscafer@outlook.com"
- name: Display runtime info ✨
run: |
echo '当前目录:'
pwd
- name: Install 🔧
run: yarn install
# - name: Build ⛏️
# run: yarn build
- name: Update blog files ⛏️
run: |
yarn sync-post
git add .
git commit -m 'chore(ci): blog sync'
git push