Skip to content

Commit fae9da0

Browse files
authored
Create update-algolia.yml
1 parent 3c8d78f commit fae9da0

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/update-algolia.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Run Algolia Crawler
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
# Allow one concurrent deployment
12+
concurrency:
13+
group: 'algolia'
14+
cancel-in-progress: true
15+
16+
env:
17+
BASE_URL: '/'
18+
19+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
20+
jobs:
21+
publish:
22+
runs-on: ubuntu-latest
23+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- name: Get the content of algolia.json as config
28+
id: algolia_config
29+
run: echo "::set-output name=config::$(cat algolia/config.json | jq -r tostring)"
30+
31+
- name: Push indices to Algolia
32+
uses: signcl/docsearch-scraper-action@master
33+
env:
34+
APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
35+
API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
36+
CONFIG: ${{ steps.algolia_config.outputs.config }}

0 commit comments

Comments
 (0)