diff --git a/.github/workflows/build-jekyll.yml b/.github/workflows/build-jekyll.yml index a8543c7f..5b69318e 100644 --- a/.github/workflows/build-jekyll.yml +++ b/.github/workflows/build-jekyll.yml @@ -19,6 +19,13 @@ jobs: restore-keys: | ${{ runner.os }}-gems- + # Update search index + - name: Update search index + env: + ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API }} + run: | + bundle exec jekyll algolia + # Use GitHub Deploy Action to build and deploy to Github - uses: helaili/jekyll-action@v2 with: diff --git a/Gemfile b/Gemfile index 9752b18f..d95f5081 100644 --- a/Gemfile +++ b/Gemfile @@ -18,6 +18,7 @@ gem "jekyll", "~> 4.2.0" group :jekyll_plugins do gem "jekyll-feed", "~> 0.12" gem "jekyll-github-metadata" + gem "jekyll-algolia", "~> 1.0" end # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem diff --git a/_config.yml b/_config.yml index e5d95c05..70b1d5fc 100644 --- a/_config.yml +++ b/_config.yml @@ -136,4 +136,9 @@ collections: - part2.md - datatypes.md - equationalReasoning.md + - laws.md - FAM.md + +algolia: + application_id: 'APP_ID' + index_name: 'csrg_index'