-
Notifications
You must be signed in to change notification settings - Fork 36
48 lines (47 loc) · 1.45 KB
/
algolia-docsearch.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: algolia doc-search
on:
- push
jobs:
changes:
name: Check changed docs files
outputs:
docs: ${{ steps.filter.outputs.docs }}
learn: ${{ steps.filter.outputs.learn }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: dorny/[email protected]
id: filter
with:
filters: |
docs:
- 'site/content/docs/**/*.md'
learn:
- 'site/content/learn/**/*.md'
scrape-docs:
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.docs == 'true' && github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v2
- name: Run doc-search
uses: darrenjennings/algolia-docsearch-action@master
with:
algolia_application_id: ${{ secrets.ALGOLIA_APP_ID }}
algolia_api_key: ${{ secrets.ALGOLIA_API_KEY }}
file: 'algolia/config-docs.json'
scrape-learn:
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.learn == 'true' && github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v2
- name: Run learn-search
uses: darrenjennings/algolia-docsearch-action@master
with:
algolia_application_id: ${{ secrets.ALGOLIA_APP_ID }}
algolia_api_key: ${{ secrets.ALGOLIA_API_KEY }}
file: 'algolia/config-learn.json'