-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 1.23 KB
/
update-algolia.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Update Algolia index
on:
push:
branches:
- main
jobs:
update-algolia:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js 16
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
with:
json: true
output_renamed_files_as_deleted_and_added: true
- name: Set environment variables from action inputs
shell: bash
run: |
echo "ADDED_FILES=${{ steps.changed-files.outputs.added_files }}" >> $GITHUB_ENV
echo "DELETED_FILES=${{ steps.changed-files.outputs.deleted_files }}" >> $GITHUB_ENV
echo "MODIFIED_FILES=${{ steps.changed-files.outputs.modified_files }}" >> $GITHUB_ENV
echo "ALGOLIA_INDEX=${{ secrets.ALGOLIA_INDEX }}" >> $GITHUB_ENV
echo "ALGOLIA_APPLICATION_ID=${{ secrets.ALGOLIA_APPLICATION_ID }}" >> $GITHUB_ENV
echo "ALGOLIA_API_KEY=${{ secrets.ALGOLIA_API_KEY }}" >> $GITHUB_ENV
- name: Update Algolia index
shell: bash
run: node .github/actions/update-algolia/dist/index.js