mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-11-30 02:58:13 +08:00
DocScrape action (#328)
* Create docsearch.yml * Create algolia-config.json * Update docsearch.yml * Update docsearch.yml * change action on schedule Would end up being ran multiple times on push, algolia scrapes once a day so makes more sense
This commit is contained in:
parent
ff048780fa
commit
daf05d6832
37
.github/workflows/algolia-config.json
vendored
Normal file
37
.github/workflows/algolia-config.json
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"index_name": "ant_design_blazor",
|
||||
"start_urls": [
|
||||
{
|
||||
"url": "https://ant-design-blazor.github.io/zh-CN/",
|
||||
"tags": [
|
||||
"cn"
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "https://ant-design-blazor.github.io/en-US/",
|
||||
"tags": [
|
||||
"en"
|
||||
]
|
||||
}
|
||||
],
|
||||
"stop_urls": [
|
||||
"/changelog"
|
||||
],
|
||||
"selectors": {
|
||||
"lvl0": {
|
||||
"selector": ".ant-menu-submenu-selected h4",
|
||||
"global": true,
|
||||
"default_value": "Documentation"
|
||||
},
|
||||
"lvl1": "article h1",
|
||||
"lvl2": "article h2",
|
||||
"lvl3": "article h3",
|
||||
"lvl4": "article h4",
|
||||
"lvl5": "article h5",
|
||||
"text": "article p, article li"
|
||||
},
|
||||
"strip_chars": "#",
|
||||
"min_indexed_level": 1,
|
||||
"js_render": true,
|
||||
"js_wait": 5
|
||||
}
|
17
.github/workflows/docsearch.yml
vendored
Normal file
17
.github/workflows/docsearch.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
name: DocSearch Scraper
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 1 * * *"
|
||||
|
||||
jobs:
|
||||
docsearch-scrape:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: scrape
|
||||
uses: darrenjennings/algolia-docsearch-action@master
|
||||
with:
|
||||
algolia_application_id: ${{ secrets.algolia_application_id }}
|
||||
algolia_api_key: ${{ secrets.algolia_api_key }}
|
||||
file: '.github/workflows/algolia-config.json'
|
Loading…
Reference in New Issue
Block a user