Doc Search Scripts #860
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: 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 |