-
Notifications
You must be signed in to change notification settings - Fork 183
36 lines (34 loc) · 1.08 KB
/
algolia-indexing.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
name: Upload Data to Algolia Index
on:
workflow_dispatch:
push:
paths:
- ".github/workflows/algolia-indexing.yml"
- "js/algolia-index.js"
- "components/**/*.adoc"
branches:
# - dev
- main
jobs:
upload_data:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Node.js 16.15.x
uses: actions/setup-node@v3
with:
node-version: '16.15.x'
- name: Upload data to Algolia Index
shell: bash
env:
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_ADMIN_API_KEY: ${{ secrets.ALGOLIA_ADMIN_API_KEY }}
ALGOLIA_INDEX_NAME_PREFIX: ${{ secrets.ALGOLIA_INDEX_NAME_PREFIX }}
working-directory: ./js # equivalent of 'cd js'
run: |
yarn install
node algolia-index.js "$ALGOLIA_APP_ID" "$ALGOLIA_ADMIN_API_KEY" "$ALGOLIA_INDEX_NAME_PREFIX"