mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
chore: typo
This commit is contained in:
14
.github/workflows/documentation.yml
vendored
14
.github/workflows/documentation.yml
vendored
@@ -121,9 +121,9 @@ jobs:
|
|||||||
git commit -m "Docs build for ${GITHUB_REF_TYPE} ${GITHUB_REF_NAME}: ${GITHUB_SHA}" || true
|
git commit -m "Docs build for ${GITHUB_REF_TYPE} ${GITHUB_REF_NAME}: ${GITHUB_SHA}" || true
|
||||||
git push
|
git push
|
||||||
|
|
||||||
build-indicies:
|
build-indices:
|
||||||
needs: build-docs
|
needs: build-docs
|
||||||
name: Build & upload search indicies
|
name: Build & upload search indices
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||||
@@ -147,15 +147,15 @@ jobs:
|
|||||||
- name: Build dependencies
|
- name: Build dependencies
|
||||||
run: pnpm run build
|
run: pnpm run build
|
||||||
|
|
||||||
- name: Upload search indicies to meilisearch
|
- name: Upload search indices to meilisearch
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||||
SEARCH_API_URL: ${{ secrets.SEARCH_API_URL }}
|
SEARCH_API_URL: ${{ secrets.SEARCH_API_URL }}
|
||||||
SEARCH_API_KEY: ${{ secrets.SEARCH_API_KEY }}
|
SEARCH_API_KEY: ${{ secrets.SEARCH_API_KEY }}
|
||||||
uses: ./packages/actions/src/uploadSearchIndicies
|
uses: ./packages/actions/src/uploadSearchIndices
|
||||||
|
|
||||||
deploy-website:
|
deploy-website:
|
||||||
needs: [build-docs, build-indicies]
|
needs: [build-docs, build-indices]
|
||||||
name: Deploy website
|
name: Deploy website
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.repository_owner == 'discordjs'
|
if: github.repository_owner == 'discordjs'
|
||||||
@@ -170,7 +170,5 @@ jobs:
|
|||||||
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
||||||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
||||||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
||||||
ALIAS_DOMAINS: |
|
|
||||||
discord.js.org
|
|
||||||
discordjs.dev
|
|
||||||
VERCEL_SCOPE: 'discordjs'
|
VERCEL_SCOPE: 'discordjs'
|
||||||
|
PRODUCTION: true
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: 'Upload search indicies'
|
name: 'Upload search indices'
|
||||||
description: 'Uploads the search indicies to a meilisearch database'
|
description: 'Uploads the search indices to a meilisearch database'
|
||||||
runs:
|
runs:
|
||||||
using: node20
|
using: node20
|
||||||
main: ../../dist/uploadSearchIndicies/index.js
|
main: ../../dist/uploadSearchIndices/index.js
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ const client = new MeiliSearch({
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
console.log('Generating all indices...');
|
console.log('Generating all indices...');
|
||||||
const indicies = await generateAllIndices({
|
const indices = await generateAllIndices({
|
||||||
fetchPackageVersions: async (pkg) => {
|
fetchPackageVersions: async (pkg) => {
|
||||||
console.log(`Fetching versions for ${pkg}...`);
|
console.log(`Fetching versions for ${pkg}...`);
|
||||||
const { rows } = await sql.execute('select version from documentation where name = ?', [pkg]);
|
const { rows } = await sql.execute('select version from documentation where name = ?', [pkg]);
|
||||||
@@ -52,7 +52,7 @@ try {
|
|||||||
console.log('Generated all indices.');
|
console.log('Generated all indices.');
|
||||||
|
|
||||||
console.log('Uploading indices...');
|
console.log('Uploading indices...');
|
||||||
for (const index of indicies) {
|
for (const index of indices) {
|
||||||
console.log(`Uploading ${index.index}...`);
|
console.log(`Uploading ${index.index}...`);
|
||||||
await client.index(index.index).addDocuments(index.data);
|
await client.index(index.index).addDocuments(index.data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export default createTsupConfig({
|
|||||||
'src/index.ts',
|
'src/index.ts',
|
||||||
'src/formatTag/index.ts',
|
'src/formatTag/index.ts',
|
||||||
'src/uploadDocumentation/index.ts',
|
'src/uploadDocumentation/index.ts',
|
||||||
'src/uploadSearchIndicies/index.ts',
|
'src/uploadSearchIndices/index.ts',
|
||||||
],
|
],
|
||||||
dts: false,
|
dts: false,
|
||||||
format: 'esm',
|
format: 'esm',
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ export async function generateAllIndices({
|
|||||||
fetchPackageVersionDocs = fetchVersionDocs,
|
fetchPackageVersionDocs = fetchVersionDocs,
|
||||||
writeToFile = true,
|
writeToFile = true,
|
||||||
}) {
|
}) {
|
||||||
const indicies: Record<any, any>[] = [];
|
const indices: Record<any, any>[] = [];
|
||||||
|
|
||||||
for (const pkg of PACKAGES) {
|
for (const pkg of PACKAGES) {
|
||||||
const versions = await fetchPackageVersions(pkg);
|
const versions = await fetchPackageVersions(pkg);
|
||||||
@@ -183,10 +183,10 @@ export async function generateAllIndices({
|
|||||||
if (writeToFile) {
|
if (writeToFile) {
|
||||||
await writeIndexToFileSystem(members, pkg, version);
|
await writeIndexToFileSystem(members, pkg, version);
|
||||||
} else {
|
} else {
|
||||||
indicies.push({ index: `${pkg}-${version.replaceAll('.', '-')}`, data: members });
|
indices.push({ index: `${pkg}-${version.replaceAll('.', '-')}`, data: members });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return indicies;
|
return indices;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user