Skip to content

Commit

Permalink
pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukaasko committed Mar 5, 2024
1 parent 3daa705 commit 08206a6
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion .github/workflows/algolia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,41 @@ name: Algolia Push

#tmp just for developing
on:
push:
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: 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

0 comments on commit 08206a6

Please sign in to comment.