Skip to content

algolia/setup-algolia-cli

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

⚙️ setup-algolia-cli

About

This action sets up the Algolia CLI, algolia, on GitHub's hosted Actions runners.

This action can be run on ubuntu-latest and macos-latest GitHub Actions runners, and will install and expose a specified version of the algolia CLI on the runner environment.

Usage

Setup the algolia CLI:

steps:
- uses: algolia/setup-algolia-cli@master

A specific version of the algolia CLI can be installed:

steps:
  - uses: algolia/setup-algolia-cli@master
    with:
      version:
        1.2.0

The credentials for the algolia CLI can be set using the ALGOLIA_APPLICATION_ID and ALGOLIA_ADMIN_API_KEY environment variables, which can be set using GitHub Secrets:

steps:
  - uses: algolia/setup-algolia-cli@master
  - name: Import settings
    run: algolia settings import MY_INDEX -F deploy/settings.json
    env:
      ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
      ALGOLIA_ADMIN_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}

Inputs

The actions supports the following inputs:

  • version: The version of algolia to install, defaulting to latest

Further reading

Read the Algolia CLI documentation to learn more about the algolia CLI.

License

MIT.