fix mistake #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 --legacy-peer-deps hugo-algolia | |
- name: Find hugo-algolia | |
run: find / -name "hugo-algolia" -type f 2>/dev/null | |
- name: Generate algolia.json | |
run: hugo-algolia --config config/_default/config.yaml | |
- name: Copy algolia.json to tools/adjust-algolia-output | |
run: cp algolia.json tools/adjust-algolia-output/ | |
- name: Build Go binary | |
run: go build | |
- name: Adjust algolia.json using binary | |
run: ./adjust-algolia-output < ./algolia.json | jq > adjusted-algolia.json | |
- name: Move adjusted algolia.json to scripts folder | |
run: mv adjusted-algolia.json scripts/ | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Install node dependencies | |
run: npm install | |
- name: Push to Algolia | |
run: node push-to-algolia.json |