Skip to content

Doc Search Scripts #868

Doc Search Scripts

Doc Search Scripts #868

Workflow file for this run

name: Doc Search Scripts
on:
schedule:
- cron: '00 06 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: 'doc-search'
- name: Login to Container Registry
uses: docker/login-action@v1
with:
registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
- name: Run scripts
run: |
cd docsearch
touch .env
echo "APPLICATION_ID=${{ secrets.ALGOLIA_APPLICATION_ID }}" >> .env
echo "API_KEY=${{ secrets.ALGOLIA_API_KEY }}" >> .env
echo "GITHUB_AUTH_TOKEN=${{ secrets.GH_TOKEN }}" >> .env
export DOCKER_REGISTRY="${{ secrets.DOCKER_REGISTRY }}"
export GITHUB_AUTH_TOKEN=${{ secrets.GH_TOKEN }}
./run-algolia-crawler-incrementally.sh `pwd` 2>&1
- name: Git push latest_commit
run: |
cd docsearch
cat algolia_configs/latest_commit.json
git status
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "update latest_commit.json"
git push