Repository navigation
54 lines (53 loc) · 1.76 KB
/
Copy pathuptrieve.yml
File metadata and controls
54 lines (53 loc) · 1.76 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Index docs with Trieve
on:
workflow_call:
secrets:
api_key:
description: "Trieve API token"
required: true
dataset:
description: "Trieve dataset ID"
required: true
inputs:
path:
required: false
type: string
default: "./docs"
latest_version:
required: false
type: string
default: ""
jobs:
uptrieve:
runs-on: ubuntu-latest
steps:
- run: |
echo "Trieve search is no longer available, skip"
# - uses: actions/checkout@v4
# - uses: ruby/setup-ruby@v1
# with:
# ruby-version: 3.3
# - name: Install uptriever
# run: |
# gem install uptriever
# - if: ${{ !contains(github.ref, 'refs/tags/v') }}
# name: Index edge documents
# run: |
# uptriever -d ${{inputs.path}} -k ${{secrets.api_key}} -s ${{secrets.dataset}}
# - if: ${{ contains(github.ref, 'refs/tags/v') }}
# id: version
# run: |
# echo VERSION_TAG=$(echo ${GITHUB_REF#refs/tags/} | cut -d'.' -f1,2) >> $GITHUB_OUTPUT
# echo VERSION_PREFIX=$(echo ${GITHUB_REF#refs/tags/} | awk -F. '{print $1 "-" $2}') >> $GITHUB_OUTPUT
# - if: ${{ contains(github.ref, 'refs/tags/v') }}
# env:
# VERSION_TAG: ${{ steps.version.outputs.VERSION_TAG }}
# VERSION_PREFIX: ${{ steps.version.outputs.VERSION_PREFIX }}
# run: |
# uptriever -d ${{inputs.path}} -k ${{secrets.api_key}} -s ${{secrets.dataset}}
# - if: ${{ contains(github.ref, 'refs/tags/v') && steps.version.outputs.VERSION_TAG == inputs.latest_version }}
# env:
# VERSION_TAG: latest
# VERSION_PREFIX: "/"
# run: |
# uptriever -d ${{inputs.path}} -k ${{secrets.api_key}} -s ${{secrets.dataset}}