ci: add scraper #1
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
name: Update Typesense | |
on: | |
workflow_dispatch: | |
push: | |
branches: [develop] | |
jobs: | |
build: | |
name: Update Typesense index | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- run: npm install | |
- run: npm run build | |
- run: | | |
npm run serve -- --port 80 & | |
docker run -it \ | |
-e TYPESENSE_API_KEY=${{ secrets.TYPESENSE_API_KEY }} \ | |
-e TYPESENSE_HOST=${{ secrets.TYPESENSE_HOST }} \ | |
-e TYPESENSE_PORT=443 \ | |
-e TYPESENSE_PROTOCOL=https \ | |
-e "CONFIG=$(cat config/typesense.json | jq -r tostring)" typesense/docsearch-scraper:latest |