Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test typesense step #1757

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ jobs:
with:
path: ./public

- name: Upload tutorials search file
uses: actions/upload-pages-artifact@v1
with:
name: tutorials-search-file
path: ./public/tutorials/typesense.json

deploy:
environment:
name: github-pages
Expand All @@ -52,6 +58,29 @@ jobs:
id: deployment
uses: actions/deploy-pages@v1

upload-tutorials-page-entries:
needs: build
runs-on: ubuntu-latest
if: github.repository_owner == 'viamrobotics'
steps:
- name: Download the tutorials search file
uses: actions/download-artifact@v3
with:
name: tutorials-search-file
- name: Write env
run: |
echo TYPESENSE_API_KEY=${{ secrets.TYPESENSE_API_KEY }} > typesense.env
echo TYPESENSE_HOST=cgnvrk0xwyj9576lp-1.a1.typesense.net >> typesense.env
echo TYPESENSE_PORT=443 >> typesense.env
echo TYPESENSE_PROTOCOL=https >> typesense.env
- name: Upload tutorials documents
run: |
jq -c '.[]' typesense.json > documents.jsonl
curl -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
-X POST \
-T documents.jsonl \
"https://cgnvrk0xwyj9576lp-1.a1.typesense.net/collections/tutorials/documents/import?action=upsert"

generate-index:
needs: build
if: github.repository_owner == 'viamrobotics'
Expand Down