-
Notifications
You must be signed in to change notification settings - Fork 74
33 lines (29 loc) · 1.06 KB
/
docs-scrapper.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
name: DocSearch Scrap
on:
# Allow to run manually
workflow_dispatch:
# Trigger on successful deployment status
deployment_status:
jobs:
update-docsearch:
name: Update DocSearch
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && github.ref == 'refs/heads/master')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Docker
uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Update DocSearch
run: |
docker run \
--env ALGOLIA_APP_ID=${ALGOLIA_APP_ID} \
--env ALGOLIA_API_KEY=${ALGOLIA_API_KEY} \
--env "CONFIG=$(cat docsearch.json | jq -r tostring)" \
algolia/docsearch-scraper
env:
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}