-
Notifications
You must be signed in to change notification settings - Fork 34
44 lines (38 loc) · 1.28 KB
/
docsearch.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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