Skip to content

Commit 2a3fe85

Browse files
committed
add indexnow
1 parent c6a0e78 commit 2a3fe85

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/IndexNow.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Notify IndexNow
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Deploy Hugo site to Pages"]
6+
types:
7+
- completed
8+
9+
jobs:
10+
check-and-submit:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Setup IndexNow
14+
# 动态生成KEY文件以防止它们在公共存储库中泄露。
15+
run: echo ${{ secrets.INDEXNOW_KEY }} > public/${{ secrets.INDEXNOW_KEY }}.txt
16+
- name: Indexnow-action
17+
uses: bojieyang/indexnow-action@v2
18+
with:
19+
# https://github.com/bojieyang/indexnow-action
20+
sitemap-location: "https://maxlen727.github.io/sitemap.xml"
21+
since: 1
22+
since-unit: "week"
23+
endpoint: "www.bing.com"
24+
key: ${{ secrets.INDEXNOW_KEY }}
25+
key-location: https://maxlen727.github.io/${{ secrets.INDEXNOW_KEY }}.txt

0 commit comments

Comments
 (0)