You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getmeili/docs-scraper:v0.9.0 pipenv run ./docs_scraper config.json
49
+
<<<<<<< HEAD
38
50
```
39
51
40
52
### In a GitHub Action
@@ -101,6 +113,74 @@ A generic configuration file:
101
113
}
102
114
```
103
115
116
+
=======
117
+
```
118
+
119
+
### In a GitHub Action
120
+
121
+
To run after your deployment job:
122
+
123
+
```yml
124
+
run-scraper:
125
+
needs: <your-deployment-job>
126
+
runs-on: ubuntu-18.04
127
+
steps:
128
+
- uses: actions/checkout@master
129
+
- name: Run scraper
130
+
env:
131
+
HOST_URL: ${{ secrets.MEILISEARCH_HOST_URL }}
132
+
API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
133
+
CONFIG_FILE_PATH: <path-to-your-config-file>
134
+
run: |
135
+
docker run -t --rm \
136
+
-e MEILISEARCH_HOST_URL=$HOST_URL \
137
+
-e MEILISEARCH_API_KEY=$API_KEY \
138
+
-v $CONFIG_FILE_PATH:/docs-scraper/config.json \
139
+
getmeili/docs-scraper:v0.9.0 pipenv run ./docs_scraper config.json
140
+
```
141
+
142
+
Here is the [GitHub Action file](https://github.com/meilisearch/documentation/blob/master/.github/workflows/gh-pages-scraping.yml) we use in production for the MeiliSearch documentation.
143
+
144
+
### About the API Key
145
+
146
+
The API key you must provide as environment variable should have the permissions to add documents into your MeiliSearch instance.
147
+
148
+
Thus, you need to provide the private key or the master key.
149
+
150
+
_More about [MeiliSearch authentication](https://docs.meilisearch.com/guides/advanced_guides/authentication.html)._
The scraper will focus on the highlighted information depending on your selectors.
105
185
106
186
Here is the [configuration file](https://github.com/meilisearch/documentation/blob/master/.vuepress/scraper/config.json) we use for the MeiliSearch documentation.
@@ -110,6 +190,7 @@ Here is the [configuration file](https://github.com/meilisearch/documentation/bl
110
190
After having crawled your documentation, you might need a search bar to improve your user experience!
111
191
112
192
For the front part, check out the [docs-searchbar.js repository](https://github.com/meilisearch/docs-searchbar.js), wich provides a front-end search bar adapted for documentation.
A GitHub Action will be triggered and push the `latest` and `vX.X.X` version of Docker image on [DockerHub](https://hub.docker.com/repository/docker/getmeili/docs-scraper)
0 commit comments