Skip to content

Commit eab16e9

Browse files
feat: doc content re algolia scraper
1 parent 6b60e17 commit eab16e9

5 files changed

Lines changed: 413 additions & 28 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Algolia Search Scraper
2+
3+
on:
4+
schedule:
5+
- cron: "0 8 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
name: Trigger Algolia Scraper
11+
runs-on: ubuntu-22.04
12+
environment: algolia
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
version:
17+
[
18+
"docs",
19+
]
20+
steps:
21+
- uses: actions/checkout@v3
22+
- id: config
23+
name: Read ${{ matrix.version }}.json
24+
shell: bash
25+
run: |
26+
content=$(cat ./.github/config/${{ matrix.version }}.json | jq -r tostring)
27+
echo "configJSON=$content" >> $GITHUB_OUTPUT
28+
- name: Checkout algolia/docsearch-scraper
29+
uses: actions/checkout@v3
30+
with:
31+
repository: algolia/docsearch-scraper
32+
path: "./algolia"
33+
- name: Set up Python
34+
uses: actions/setup-python@v4.5.0
35+
with:
36+
python-version: "3.6"
37+
- name: Install pipenv
38+
shell: bash
39+
run: |
40+
pip install pipenv
41+
- name: pipenv Pipfile
42+
shell: bash
43+
run: |
44+
cd ./algolia
45+
pipenv install
46+
- name: run algolia
47+
shell: bash
48+
env:
49+
APPLICATION_ID: ${{ secrets.APPLICATION_ID }}
50+
API_KEY: ${{ secrets.API_KEY }}
51+
CONFIG: ${{ steps.config.outputs.configJSON }}
52+
run: |
53+
cd ./algolia/scraper
54+
pipenv run python -m src.index
55+

docs/advanced/enabling-search.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ const config = {
4040
};
4141
```
4242

43+
Add the [algolia-search-scraper](../../.github/workflows/algolia-search-scraper.yml) to your repo and include an environment 'algolia' with secrets for APPLICATION_ID and API_KEY. Edit the `docs` index in the file to match your repo's index in Algolia. This workflow will run in the background and populate the index that algolia uses to search.
44+
4345
## Source code is not open-source
4446

4547
Unfortunately, if your project does not satisfy the [checklist](https://docsearch.algolia.com/docs/who-can-apply/) then we cannot use Algolia (for free).

docs/getting-started/understanding-repo-layout.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ Used by [`npm`](https://docs.npmjs.com/cli/v9/configuring-npm/package-json) cont
251251

252252
## 📖 `project-words.txt`
253253

254-
Used by `CSpell` in the `.cspell.json` configuration file with additional project words that should not be flagged as misspelling when linting.
254+
Used by `CSpell` in the `.cspell.json` configuration file with additional project words that should not be flagged as misspelling when linting. Please add your project words here periodically as this is the master file that all repos use.
255255

256256
## 🦖 `sidebars.js`
257257

0 commit comments

Comments
 (0)