-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 962 Bytes
/
upload_index.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
name: Upload Data to Algolia Index
on:
push:
branches:
- master
jobs:
upload_data:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
extended: true
- name: Build Site
run: hugo
- name: Upload Data
working-directory: ./algolia # equivalent of 'cd algolia'
run: |
npm install
npm run data-upload -- -c \
-f ../public/index.json \
-a I54MTIWIV7 \
-k ${{ secrets.ALGOLIA_ADMIN_API_KEY }} \
-n blog_hexsix_me