1
0
wiki/.github/workflows/algolia.yml

24 lines
680 B
YAML
Raw Normal View History

2022-12-29 11:02:28 +08:00
name: Algolia Push Data
on:
schedule:
- cron: '0 2 * * 3'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run Crawler
env:
ALGOLIA_ADMIN_API_KEY: ${{ secrets.ALGOLIA_ADMIN_API_KEY }}
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
run: |
sudo apt-get update &&
sudo apt-get install -y jq &&
docker run -t\
-e APPLICATION_ID=$ALGOLIA_APP_ID \
-e API_KEY=$ALGOLIA_ADMIN_API_KEY \
-e "CONFIG=$(cat .github/workflows/docsearch.json | jq -r tostring)" \
algolia/docsearch-scraper