Skip to content

fixup algolia

fixup algolia #11

Workflow file for this run

name: Algolia Push
#tmp just for developing
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install npm dependencies
run: npm install -g --legacy-peer-deps hugo-algolia
- name: Check if hugo-algolia is installed
run: hugo-algolia --version
- name: Generate algolia.json
run: hugo-algolia --config config/_default/config.yaml
- name: Build Go binary
run: go build -o adjust-algolia-output tools/adjust-algolia-output/main.go
- name: Adjust algolia.json using binary
run: ./adjust-algolia-output < ./public/algolia.json | jq > scripts/algolia.json
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Push to Algolia
run: |
cd scripts
npm install
APPLICATION_ID=${{ secrets.ALGOLIA_API_KEY }} API_KEY=${{ secrets.ALGOLIA_API_KEY }} node push-to-algolia.json scripts/algolia.json