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:
Kieran Coldron 2020-07-09 03:33:26 +01:00 committed by GitHub
parent ff048780fa
commit daf05d6832
2 changed files with 54 additions and 0 deletions

37
.github/workflows/algolia-config.json vendored Normal file
View 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
View 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'