Skip to content

DocSearch Scrap

DocSearch Scrap #331

Workflow file for this run

name: DocSearch Scrap
on:
# Allow to run manually
workflow_dispatch:
# Trigger on successful deployment status
deployment_status:
jobs:
update-docsearch:
name: Update DocSearch
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && github.ref == 'refs/heads/master')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Docker
uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Update DocSearch
run: |
docker run \
--env ALGOLIA_APP_ID=${ALGOLIA_APP_ID} \
--env ALGOLIA_API_KEY=${ALGOLIA_API_KEY} \
--env "CONFIG=$(cat docsearch.json | jq -r tostring)" \
algolia/docsearch-scraper
env:
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}