Merge pull request #456 from permitio/filipermit/code-block #506
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will update the search index so that search results are accurate | |
name: Crawl website with Algolia | |
on: | |
push: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
crawl: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
# wait until Netlify deploy is done | |
- name: Wait for Netlify Deploy | |
uses: probablyup/wait-for-netlify-action@3.2.0 | |
id: waitForDeployment | |
with: | |
site_id: ${{ secrets.NETLIFY_SITE_ID }} | |
env: | |
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }} | |
# Crawl the website | |
- name: Algolia crawler creation and crawl | |
uses: algolia/algoliasearch-crawler-github-actions@v1.0.10 | |
id: algolia_crawler | |
with: # mandatory parameters | |
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 }} | |
crawler-name: permit | |
site-url: 'https://docs.permit.io' |