Skip to content

Commit e4305fe

Browse files
authored
Fix algolia search and removed duplicate dependencies (#837)
* Add algolia search env in build step & remove duplicate pkg from pkg.json * fixes preview deployment * chore(husky): fix husky warning
1 parent 2882896 commit e4305fe

File tree

6 files changed

+18
-37
lines changed

6 files changed

+18
-37
lines changed

.github/workflows/preview-deployment.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,15 @@ jobs:
7272

7373
- name: Build Site
7474
run: yarn run build
75+
env:
76+
NEXT_PUBLIC_ALGOLIA_APP_ID: ${{ secrets.NEXT_PUBLIC_ALGOLIA_APP_ID }}
77+
NEXT_PUBLIC_ALGOLIA_API_KEY: ${{ secrets.NEXT_PUBLIC_ALGOLIA_API_KEY }}
7578

7679
- name: Deploy to Cloudflare Pages
7780
uses: AdrianGonz97/refined-cf-pages-action@v1
7881
with:
79-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
80-
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
82+
apiToken: ${{ secrets.CF_API_TOKEN }}
83+
accountId: ${{ secrets.CF_ACCOUNT_ID }}
8184
githubToken: ${{ secrets.GITHUB_TOKEN }}
8285
projectName: ${{ vars.CF_PROJECT_NAME }}
8386
directory: out

.github/workflows/production-deployment.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Docs Production Deployment
1+
name: Production Deployment
22
on:
33
push:
44
branches:
@@ -52,6 +52,9 @@ jobs:
5252

5353
- name: Build Site
5454
run: yarn run build
55+
env:
56+
NEXT_PUBLIC_ALGOLIA_APP_ID: ${{ secrets.NEXT_PUBLIC_ALGOLIA_APP_ID }}
57+
NEXT_PUBLIC_ALGOLIA_API_KEY: ${{ secrets.NEXT_PUBLIC_ALGOLIA_API_KEY }}
5558

5659
- name: Deploy to Cloudflare Pages
5760
uses: AdrianGonz97/refined-cf-pages-action@v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ yarn-error.log*
3333
.env.development.local
3434
.env.test.local
3535
.env.production.local
36+
.env
3637

3738
# vercel
3839
.vercel

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
echo 'Performing code styling, testing, and building processes before committing'
52

63
# Check ESLint Standards

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@
5151
"@next/eslint-plugin-next": "^14.0.1",
5252
"@types/file-saver": "^2.0.7",
5353
"@types/js-yaml": "^4.0.5",
54-
"@types/node": "^20.0.0",
55-
"@types/react": "18.3.3",
5654
"@types/node": "^20.14.10",
55+
"@types/react": "18.3.3",
5756
"@types/react-syntax-highlighter": "^15.5.13",
5857
"@types/react-text-truncate": "^0.14.1",
5958
"@typescript-eslint/eslint-plugin": "^6.21.0",

yarn.lock

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ deep-is@^0.1.3:
11681168
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"
11691169
integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==
11701170

1171-
define-data-property@^1.0.1, define-data-property@^1.1.1:
1171+
define-data-property@^1.0.1:
11721172
version "1.1.1"
11731173
resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3"
11741174
integrity sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==
@@ -3311,7 +3311,7 @@ run-parallel@^1.1.9:
33113311
dependencies:
33123312
queue-microtask "^1.2.2"
33133313

3314-
safe-array-concat@^1.1.2:
3314+
safe-array-concat@^1.0.1, safe-array-concat@^1.1.2:
33153315
version "1.1.2"
33163316
resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb"
33173317
integrity sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==
@@ -3383,7 +3383,7 @@ semver@^7.0.0, semver@^7.5.3, semver@^7.5.4:
33833383
dependencies:
33843384
lru-cache "^6.0.0"
33853385

3386-
set-function-length@^1.2.1:
3386+
set-function-length@^1.1.1, set-function-length@^1.2.1:
33873387
version "1.2.2"
33883388
resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449"
33893389
integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==
@@ -3400,12 +3400,9 @@ set-function-name@^2.0.0, set-function-name@^2.0.1:
34003400
resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a"
34013401
integrity sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==
34023402
dependencies:
3403-
define-data-property "^1.1.4"
3404-
es-errors "^1.3.0"
3405-
function-bind "^1.1.2"
3406-
get-intrinsic "^1.2.4"
3407-
gopd "^1.0.1"
3408-
has-property-descriptors "^1.0.2"
3403+
define-data-property "^1.0.1"
3404+
functions-have-names "^1.2.3"
3405+
has-property-descriptors "^1.0.0"
34093406

34103407
set-function-name@^2.0.2:
34113408
version "2.0.2"
@@ -3422,16 +3419,6 @@ setimmediate@^1.0.5:
34223419
resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
34233420
integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==
34243421

3425-
set-function-name@^2.0.2:
3426-
version "2.0.2"
3427-
resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985"
3428-
integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==
3429-
dependencies:
3430-
define-data-property "^1.1.4"
3431-
es-errors "^1.3.0"
3432-
functions-have-names "^1.2.3"
3433-
has-property-descriptors "^1.0.2"
3434-
34353422
shebang-command@^2.0.0:
34363423
version "2.0.0"
34373424
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
@@ -3612,7 +3599,7 @@ string.prototype.trimend@^1.0.8:
36123599
define-properties "^1.2.1"
36133600
es-object-atoms "^1.0.0"
36143601

3615-
string.prototype.trimstart@^1.0.8:
3602+
string.prototype.trimstart@^1.0.7, string.prototype.trimstart@^1.0.8:
36163603
version "1.0.8"
36173604
resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde"
36183605
integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==
@@ -3628,15 +3615,6 @@ string_decoder@~1.1.1:
36283615
dependencies:
36293616
safe-buffer "~5.1.0"
36303617

3631-
string.prototype.trimstart@^1.0.8:
3632-
version "1.0.8"
3633-
resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde"
3634-
integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==
3635-
dependencies:
3636-
call-bind "^1.0.7"
3637-
define-properties "^1.2.1"
3638-
es-object-atoms "^1.0.0"
3639-
36403618
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
36413619
version "6.0.1"
36423620
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"

0 commit comments

Comments
 (0)