Skip to content

Commit 2efe691

Browse files
committed
workflow: add IndexNow key generation and submission steps
Implemented steps to generate and submit the IndexNow key file in the deployment workflow. Updated sitemap ignore patterns to enhance SEO management. Signed-off-by: Chiho Sin <[email protected]>
1 parent cf10cca commit 2efe691

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ jobs:
3333
- name: Build website
3434
run: npm run build
3535

36+
- name: Generate IndexNow Key File
37+
run: |
38+
echo ${{ secrets.INDEXNOW_KEY }} > ./build/${{ secrets.INDEXNOW_KEY }}.txt
39+
3640
- name: Upload Build Artifact
3741
uses: actions/upload-pages-artifact@v3
3842
with:
@@ -56,3 +60,14 @@ jobs:
5660
- name: Deploy to GitHub Pages
5761
id: deployment
5862
uses: actions/deploy-pages@v4
63+
64+
indexnow:
65+
name: Submit IndexNow
66+
needs: deploy
67+
runs-on: ubuntu-latest
68+
steps:
69+
- name: Submit IndexNow
70+
uses: bojieyang/indexnow-action@v2
71+
with:
72+
sitemap-location: https://docs.fobestudio.com/sitemap.xml
73+
key: ${{ secrets.INDEXNOW_KEY }}

docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ module.exports = {
292292
lastmod: "datetime",
293293
changefreq: "weekly",
294294
priority: 0.5,
295-
ignorePatterns: ["/404", "/404/**"],
295+
ignorePatterns: ["/404", "/404/**", "/tags", "/tags/**", "/search"],
296296
},
297297
docs: {
298298
breadcrumbs: true,

static/indexnow.key

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)