GithubHelp home page GithubHelp logo

shekelash / algolia-jekyll-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dieghernan/algolia-jekyll-action

0.0 0.0 0.0 10 KB

Runs jekyll-algolia plugin for GitHub Pages

Home Page: https://github.com/marketplace/actions/algolia-jekyll-action

License: MIT License

algolia-jekyll-action's Introduction

algolia-jekyll-action

latest-version gh-pages jekyll ruby

This is a wrapper of the jekyll-algolia plugin.

๐ŸŽ‰ GitHub Pages ready!

This action pushes all your content in an Algolia index.

Repo setup

Full reference on the jekyll-algolia documentation.

Install jekyll-algolia

You need to add jekyll-algolia to your Gemfile, as part of the :jekyll-plugins group.

Minimal Gemfile example:

source 'https://rubygems.org'

gem 'jekyll', '~> 3.6'

group :jekyll_plugins do
  gem 'jekyll-algolia'
end

Configuration

On your Algolia account (free Community plan available), get your credentials from your dashboard.

On your _config.yml, write:

algolia:
   application_id: YOUR_APPLICATION_ID
   index_name: YOUR_INDEX_NAME # You can replace that with whatever name you want
   search_only_api_key: YOUR_SEARCH_ONLY_API_KEY

Important: On your GitHub repo, go to Settings > Secrets and set a new secret:

Name Value
ALGOLIA_API_KEY YOUR_ADMIN_API_KEY

The Action

Create a workflow file (e.g. algolia-search.yml) in your-repo/.github/workflows/ directory, similar to:

on:
  push:
    branches:
      - master
      - main

name: algolia-search
jobs:
  algolia-search:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: '2.6'
          bundler-cache: true
          
      - uses: actions/[email protected]
        with:
          path: vendor/bundle
          key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
          restore-keys: |
            ${{ runner.os }}-gems-
            
      - name: Algolia Jekyll Action
        uses: dieghernan/algolia-jekyll-action@v1
        with:
          APIKEY: '${{ secrets.ALGOLIA_API_KEY }}'

This action would run on every commit on the main/master. For more trigger events see this link.

Disclaimer

This software is in no way officially related to or endorsed by Algolia.

algolia-jekyll-action's People

Contributors

dieghernan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.