mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
chore: update meilisearch settings (#10659)
* chore: update meilisearch settings * fix: docker build
This commit is contained in:
@@ -7,6 +7,7 @@ on:
|
||||
paths:
|
||||
- '.github/workflows/scrape.yml'
|
||||
- 'docs/**'
|
||||
workflow_dispatch: ~
|
||||
|
||||
jobs:
|
||||
scrape-docs:
|
||||
@@ -14,10 +15,16 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Use Node.js v16
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: 'yarn'
|
||||
- name: Pull image
|
||||
run: docker pull getmeili/docs-scraper
|
||||
- name: Wait for Netlify to finish
|
||||
run: sleep 3m
|
||||
if: github.event_name == 'push'
|
||||
- name: Run docs-scraper
|
||||
env:
|
||||
HOST_URL: ${{ secrets.MEILISEARCH_HOST_URL }}
|
||||
@@ -29,3 +36,14 @@ jobs:
|
||||
-e MEILISEARCH_API_KEY=$API_KEY \
|
||||
-v $CONFIG_FILE_PATH:/docs-scraper/config.json \
|
||||
getmeili/docs-scraper pipenv run ./docs_scraper config.json
|
||||
- name: Update meilisearch settings
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
HOST_URL: ${{ secrets.MEILISEARCH_HOST_URL }}
|
||||
API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
|
||||
with:
|
||||
script: |
|
||||
const meilisearchHost = process.env.HOST_URL
|
||||
const meilisearchApiKey = process.env.API_KEY
|
||||
const script = require(`${process.env.GITHUB_WORKSPACE}/scripts/docs-scraper/settings.js`)
|
||||
await script({ core }, meilisearchHost, meilisearchApiKey)
|
||||
|
||||
Reference in New Issue
Block a user