Skip to content

Commit dff7a92

Browse files
chore: re-enable algolia support (#292)
* use environment variables for algolia secrets * algolia stuff * add this to test deploy too
1 parent 0feca4f commit dff7a92

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ permissions:
1212

1313
jobs:
1414
build-and-deploy:
15+
env:
16+
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
17+
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
18+
ALGOLIA_INDEX: ${{ secrets.ALGOLIA_INDEX }}
1519
permissions:
1620
contents: write # for JamesIves/github-pages-deploy-action to push changes in repo
1721
runs-on: ubuntu-latest

.github/workflows/test-deploy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55

66
jobs:
77
test-deploy:
8+
env:
9+
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
10+
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
11+
ALGOLIA_INDEX: ${{ secrets.ALGOLIA_INDEX }}
812
runs-on: ubuntu-latest
913
steps:
1014
- uses: actions/checkout@v3

docusaurus.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ const config = {
245245
additionalLanguages: ["protobuf", "go-module"], // https://prismjs.com/#supported-languages
246246
},
247247
algolia: {
248-
appId: "QLS2QSP47E",
249-
apiKey: "4d9feeb481e3cfef8f91bbc63e090042",
250-
indexName: "sdk_docs",
248+
appId: process.env.ALGOLIA_APP_ID,
249+
apiKey: process.env.ALGOLIA_API_KEY,
250+
indexName: process.env.ALGOLIA_INDEX,
251251
contextualSearch: false,
252252
},
253253
}),

0 commit comments

Comments
 (0)