Skip to content

Algolia DocSearch Scraper #185

Algolia DocSearch Scraper

Algolia DocSearch Scraper #185

name: Algolia DocSearch Scraper
on:
push:
branches: [release-algolia] # 根據需要調整分支名稱
schedule:
- cron: "0 0 * * *" # 每天午夜運行
jobs:
scrape:
if: github.repository == 'Mr-Smilin/LoM-wiki'
runs-on: ubuntu-latest
environment: github-pages
steps:
- uses: actions/checkout@v2
- name: Prepare Algolia DocSearch config
run: |
echo '${{ secrets.ALGOLIA_CONFIG }}' > config.json
cat config.json # 檢查配置檔案內容
- name: Run DocSearch Scraper
env:
APPLICATION_ID: ${{ secrets.ALGOLIA_ID }}
API_KEY: ${{ secrets.ALGOLIA_KEY }}
run: |
docker run \
-e APPLICATION_ID=$APPLICATION_ID \
-e API_KEY=$API_KEY \
-e CONFIG="$(cat config.json | jq -c .)" \
algolia/docsearch-scraper