Skip to content

fix working directory #30

fix working directory

fix working directory #30

name: Update Search Index
on:
push:
branches:
- main
jobs:
updateIndex:
runs-on: ubuntu-latest
# This default is still useful for the final 'run' step
# This also solved ruby gems security issue popping up when installed in insecure location
defaults:
run:
working-directory: ./docs
env:
SECRET_ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup Ruby, Bundler, and Install Gems
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
# This tells the action where to find the Gemfile
working-directory: ./docs
bundler-cache: true
- name: Update Algolia Index
run: |
ALGOLIA_API_KEY="$SECRET_ALGOLIA_API_KEY" bundle exec jekyll algolia