-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvercel_pr.yml
32 lines (29 loc) · 1.01 KB
/
vercel_pr.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
name: Vercel -> Algolia Crawler (PR)
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
jobs:
algolia_recrawl:
name: Algolia Recrawl
runs-on: ubuntu-latest
steps:
# checkout this repo
- name: Checkout Repo
uses: actions/checkout@v2
# Get url directly from vercel
- name: Get deployment URL
id: deployment
uses: dorshinar/get-deployment-url@master
timeout-minutes: 1
with:
token: ${{ github.token }}
- name: Vercel-PR => Algolia crawler creation and recrawl on preview (Pull Request)
uses: algolia/algoliasearch-crawler-github-actions@v1
id: crawler_pr
with:
crawler-user-id: ${{ secrets.CRAWLER_USER_ID }}
crawler-api-key: ${{ secrets.CRAWLER_API_KEY }}
algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }}
algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }}
site-url: ${{ steps.deployment.outputs.deployment }}
override-config: true