-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1885 from Urigo/feat/search-indexing
feat(website): index doc pages in new search
- Loading branch information
Showing
18 changed files
with
765 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Algolia Integrity | ||
on: | ||
pull_request: | ||
paths: | ||
- 'website/**' | ||
jobs: | ||
algolia-records-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node 18 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
- name: Install Dependencies | ||
run: yarn --ignore-engines | ||
working-directory: ./website | ||
|
||
- name: Build Packages | ||
run: yarn build | ||
working-directory: ./website | ||
|
||
- name: Algolia generate | ||
run: yarn algolia-sync | ||
working-directory: ./website | ||
env: | ||
ALGOLIA_DRY_RUN: true | ||
SITE_URL: https://www.graphql-cli.com/ | ||
|
||
- name: Yarn build at root | ||
run: yarn | ||
|
||
- name: Prettier | ||
run: yarn prettier -w website/algolia-lockfile.json | ||
|
||
- name: Compare | ||
run: git diff origin/${{ github.base_ref }}.. -- website/algolia-lockfile.json | ||
|
||
- name: Diff to file | ||
if: always() | ||
id: diff_result | ||
run: | | ||
OUTPUT=$(git diff origin/${{ github.base_ref }}.. -- website/algolia-lockfile.json) | ||
OUTPUT="${OUTPUT//'%'/'%25'}" | ||
OUTPUT="${OUTPUT//$'\n'/'%0A'}" | ||
OUTPUT="${OUTPUT//$'\r'/'%0D'}" | ||
echo "::set-output name=result::$OUTPUT" | ||
- name: Publish a message | ||
if: always() && contains(steps.diff_result.outputs.result, 'diff') | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
message: | | ||
```diff | ||
${{ steps.diff_result.outputs.result }} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Algolia Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
algolia-push-records: | ||
name: Push new records if changes | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
|
||
- name: Install Dependencies | ||
run: yarn | ||
working-directory: ./website | ||
|
||
- name: Build Packages | ||
run: yarn build | ||
working-directory: ./website | ||
|
||
- name: Algolia push | ||
run: yarn algolia-sync | ||
working-directory: ./website | ||
env: | ||
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} | ||
ALGOLIA_ADMIN_API_KEY: ${{ secrets.ALGOLIA_ADMIN_API_KEY }} | ||
ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME }} | ||
SITE_URL: https://www.graphql-cli.com/ | ||
|
||
- name: Yarn build at root | ||
run: yarn | ||
|
||
- name: Prettier | ||
run: yarn prettier -w website/algolia-lockfile.json | ||
|
||
- name: Compare | ||
run: git diff website/algolia-lockfile.json | ||
|
||
- name: Diff to file | ||
if: always() | ||
id: diff_result | ||
run: | | ||
OUTPUT=$(git diff website/algolia-lockfile.json) | ||
OUTPUT="${OUTPUT//'%'/'%25'}" | ||
OUTPUT="${OUTPUT//$'\n'/'%0A'}" | ||
OUTPUT="${OUTPUT//$'\r'/'%0D'}" | ||
echo "::set-output name=result::$OUTPUT" | ||
- name: Commit algolia-lockfile.json | ||
if: always() && contains(steps.diff_result.outputs.result, 'diff') | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
commit: website/algolia-lockfile.json | ||
message: Update algolia-lockfile.json | ||
default_author: github_actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,224 @@ | ||
[ | ||
{ | ||
"objectID": "cli-codegen", | ||
"headings": [], | ||
"toc": [], | ||
"content": "-", | ||
"url": "https://www.graphql-cli.com/codegen", | ||
"domain": "https://www.graphql-cli.com/", | ||
"hierarchy": ["CLI", "codegen"], | ||
"source": "CLI", | ||
"title": "codegen", | ||
"type": "Documentation" | ||
}, | ||
{ | ||
"objectID": "cli-coverage", | ||
"headings": [], | ||
"toc": [], | ||
"content": "-", | ||
"url": "https://www.graphql-cli.com/coverage", | ||
"domain": "https://www.graphql-cli.com/", | ||
"hierarchy": ["CLI", "coverage"], | ||
"source": "CLI", | ||
"title": "coverage", | ||
"type": "Documentation" | ||
}, | ||
{ | ||
"objectID": "cli-custom-commands", | ||
"headings": [ | ||
"Writing your own commands", | ||
"Testing your plugin locally", | ||
"Loading GraphQL Schema", | ||
"Error Handling" | ||
], | ||
"toc": [ | ||
{ | ||
"children": [ | ||
{ | ||
"children": [ | ||
{ | ||
"children": [], | ||
"title": "Getting Started", | ||
"anchor": "getting-started" | ||
} | ||
], | ||
"title": "TL;DR", | ||
"anchor": "tldr" | ||
} | ||
], | ||
"title": "Writing your own commands", | ||
"anchor": "writing-your-own-commands" | ||
}, | ||
{ | ||
"children": [], | ||
"title": "Testing your plugin locally", | ||
"anchor": "testing-your-plugin-locally" | ||
}, | ||
{ | ||
"children": [], | ||
"title": "Loading GraphQL Schema", | ||
"anchor": "loading-graphql-schema" | ||
}, | ||
{ | ||
"children": [], | ||
"title": "Error Handling", | ||
"anchor": "error-handling" | ||
} | ||
], | ||
"content": "-", | ||
"url": "https://www.graphql-cli.com/custom-commands", | ||
"domain": "https://www.graphql-cli.com/", | ||
"hierarchy": ["CLI", "Custom commands"], | ||
"source": "CLI", | ||
"title": "Custom commands", | ||
"type": "Documentation" | ||
}, | ||
{ | ||
"objectID": "cli-diff", | ||
"headings": [], | ||
"toc": [], | ||
"content": "-", | ||
"url": "https://www.graphql-cli.com/diff", | ||
"domain": "https://www.graphql-cli.com/", | ||
"hierarchy": ["CLI", "diff"], | ||
"source": "CLI", | ||
"title": "diff", | ||
"type": "Documentation" | ||
}, | ||
{ | ||
"objectID": "cli-discover", | ||
"headings": [], | ||
"toc": [], | ||
"content": "-", | ||
"url": "https://www.graphql-cli.com/discover", | ||
"domain": "https://www.graphql-cli.com/", | ||
"hierarchy": ["CLI", "discover"], | ||
"source": "CLI", | ||
"title": "discover", | ||
"type": "Documentation" | ||
}, | ||
{ | ||
"objectID": "cli-generate", | ||
"headings": [], | ||
"toc": [], | ||
"content": "-", | ||
"url": "https://www.graphql-cli.com/generate", | ||
"domain": "https://www.graphql-cli.com/", | ||
"hierarchy": ["CLI", "generate"], | ||
"source": "CLI", | ||
"title": "generate", | ||
"type": "Documentation" | ||
}, | ||
{ | ||
"objectID": "cli-init", | ||
"headings": [], | ||
"toc": [], | ||
"content": "-", | ||
"url": "https://www.graphql-cli.com/init", | ||
"domain": "https://www.graphql-cli.com/", | ||
"hierarchy": ["CLI", "init"], | ||
"source": "CLI", | ||
"title": "init", | ||
"type": "Documentation" | ||
}, | ||
{ | ||
"objectID": "cli-introduction", | ||
"headings": [], | ||
"toc": [], | ||
"content": "-", | ||
"url": "https://www.graphql-cli.com/introduction", | ||
"domain": "https://www.graphql-cli.com/", | ||
"hierarchy": ["CLI", "Introduction"], | ||
"source": "CLI", | ||
"title": "Introduction", | ||
"type": "Documentation" | ||
}, | ||
{ | ||
"objectID": "cli-introspect", | ||
"headings": [], | ||
"toc": [], | ||
"content": "-", | ||
"url": "https://www.graphql-cli.com/introspect", | ||
"domain": "https://www.graphql-cli.com/", | ||
"hierarchy": ["CLI", "introspect"], | ||
"source": "CLI", | ||
"title": "introspect", | ||
"type": "Documentation" | ||
}, | ||
{ | ||
"objectID": "cli-migration", | ||
"headings": ["Migration from GraphQL CLI 3.x or older"], | ||
"toc": [ | ||
{ | ||
"children": [ | ||
{ | ||
"children": [ | ||
{ | ||
"children": [], | ||
"title": "Update your configuration file", | ||
"anchor": "update-your-configuration-file" | ||
}, | ||
{ | ||
"children": [], | ||
"title": "Comparison of old commands", | ||
"anchor": "comparison-of-old-commands" | ||
}, | ||
{ | ||
"children": [], | ||
"title": "Special Notes for Prisma users", | ||
"anchor": "special-notes-for-prisma-users" | ||
} | ||
], | ||
"title": "Install the new version", | ||
"anchor": "install-the-new-version" | ||
} | ||
], | ||
"title": "Migration from GraphQL CLI 3.x or older", | ||
"anchor": "migration-from-graphql-cli-3x-or-older" | ||
} | ||
], | ||
"content": "-", | ||
"url": "https://www.graphql-cli.com/migration", | ||
"domain": "https://www.graphql-cli.com/", | ||
"hierarchy": ["CLI", "Migration"], | ||
"source": "CLI", | ||
"title": "Migration", | ||
"type": "Documentation" | ||
}, | ||
{ | ||
"objectID": "cli-serve", | ||
"headings": [], | ||
"toc": [], | ||
"content": "-", | ||
"url": "https://www.graphql-cli.com/serve", | ||
"domain": "https://www.graphql-cli.com/", | ||
"hierarchy": ["CLI", "serve"], | ||
"source": "CLI", | ||
"title": "serve", | ||
"type": "Documentation" | ||
}, | ||
{ | ||
"objectID": "cli-similar", | ||
"headings": [], | ||
"toc": [], | ||
"content": "-", | ||
"url": "https://www.graphql-cli.com/similar", | ||
"domain": "https://www.graphql-cli.com/", | ||
"hierarchy": ["CLI", "similar"], | ||
"source": "CLI", | ||
"title": "similar", | ||
"type": "Documentation" | ||
}, | ||
{ | ||
"objectID": "cli-validate", | ||
"headings": [], | ||
"toc": [], | ||
"content": "-", | ||
"url": "https://www.graphql-cli.com/validate", | ||
"domain": "https://www.graphql-cli.com/", | ||
"hierarchy": ["CLI", "validate"], | ||
"source": "CLI", | ||
"title": "validate", | ||
"type": "Documentation" | ||
} | ||
] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.