-
Notifications
You must be signed in to change notification settings - Fork 12
37 lines (30 loc) · 1.29 KB
/
run-algolia-scraper.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
on:
push:
branches:
- 'main'
jobs:
wait-for-vercel-deployment:
runs-on: ubuntu-20.04
steps:
- name: Set deployment URL
run: "echo VERCEL_DEPLOYMENT_URL=devcycle-docs.vercel.app >> $GITHUB_ENV"
- uses: UnlyEd/[email protected]
name: Waits for Vercel deployment to finish
id: await-vercel
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
with:
deployment-url: ${{ env.VERCEL_DEPLOYMENT_URL }}
timeout: 10 # Wait for 10 seconds before failing
- name: Displays the deployment name (example on how to read information about the deployment)
run: "echo The deployment at ${{ fromJson(steps.await-vercel.outputs.deploymentDetails).url }} is ${{ fromJson(steps.await-vercel.outputs.deploymentDetails).readyState }}"
- uses: actions/checkout@v4
- name: Get the content of algolia.json as config
id: algolia_config
run: echo "::set-output name=config::$(cat algolia.json | jq -r tostring)"
- name: Push indices to Algolia
uses: signcl/docsearch-scraper-action@master
env:
APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
CONFIG: ${{ steps.algolia_config.outputs.config }}