Skip to content

Commit

Permalink
chore: add github action for ingesting docs data to Algolia (#980)
Browse files Browse the repository at this point in the history
* chore: add github action for ingesting docs data to Algolia

* chore: update 7docs version to add skip embeddings

* chore: remove fetch depth to avoid all branches

* chore: remove extra param value for skip embeddings
  • Loading branch information
realdreamer authored Oct 5, 2023
1 parent 2dfcd29 commit 3fba752
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .changeset/kind-books-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
32 changes: 32 additions & 0 deletions .github/workflows/docs-ingestion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Docs website data ingestion to Algolia for semantic search

on:
push:
branches:
- main
paths:
- packages/apps/docs/**

jobs:
ingestion:
name: Ingestion docs website data to Algolia
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false

- uses: actions/setup-node@v3
with:
node-version: 20

- uses: pnpm/action-setup@v2
with:
version: 8

- name: pnpm install
run: pnpm install

- name: Ingest docs to Algolia
run: pnpm run 7d:ingest-algolia
working-directory: packages/apps/docs
6 changes: 3 additions & 3 deletions packages/apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"7d": "npx 7d pinecone-create-index --index kda-docs --environment asia-northeast1-gcp",
"7d:clear": "npx 7d pinecone-clear-namespace --namespace kda-docs",
"7d:ingest": "npx 7d ingest --files 'src/pages/docs/**/*.md' --files 'src/pages/docs/**/*.mdx' --files 'src/specs/**/*.json' --namespace kda-docs",
"7d:ingest-algolia": "npx 7d ingest --files 'src/pages/docs/**/*.md' --files 'src/pages/docs/**/*.mdx' --files 'src/specs/**/*.json' --db algolia --namespace docs_website_dev",
"7d:ingest-algolia": "npx 7d ingest --files 'src/pages/docs/**/*.md' --files 'src/pages/docs/**/*.mdx' --files 'src/specs/**/*.json' --db algolia --namespace docs_website_dev --skip-embeddings",
"7d:query": "npx 7d",
"build": "pnpm run build:scripts && next build",
"build:blogAuthorInfo": "node src/scripts/createBlogAuthors.mjs",
Expand Down Expand Up @@ -37,7 +37,7 @@
"test": "echo 'No tests, until there is time to debug the build'"
},
"dependencies": {
"@7-docs/edge": "^0.4.0",
"@7-docs/edge": "^0.5.0",
"@google-analytics/data": "~3.2.2",
"@kadena/fonts": "~0.0.1",
"@kadena/react-ui": "workspace:*",
Expand Down Expand Up @@ -71,7 +71,7 @@
"styled-components": "~5.3.10"
},
"devDependencies": {
"@7-docs/cli": "^0.4.0",
"@7-docs/cli": "^0.5.0",
"@kadena-dev/eslint-config": "workspace:*",
"@kadena-dev/heft-rig": "workspace:*",
"@kadena-dev/lint-package": "workspace:*",
Expand Down
26 changes: 13 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit 3fba752

@vercel
Copy link

@vercel vercel bot commented on 3fba752 Oct 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs-storybook – ./packages/apps/docs

kadena-js-docs.vercel.app
docs-storybook-kadena-js.vercel.app
docs-storybook-git-main-kadena-js.vercel.app

Please sign in to comment.