Skip to content

Commit f71e4f1

Browse files
committed
update: more improvements.
1 parent 806aa9f commit f71e4f1

File tree

8 files changed

+14
-10
lines changed

8 files changed

+14
-10
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ jobs:
3838
labels: ${{ steps.meta.outputs.labels }}
3939
build-args: |
4040
_BUILD_WEBSITE_URL=https://appwrite.io
41-
_BUILD_WEBSITE_VERSION=1.6.x
41+
_BUILD_WEBSITE_VERSION=cloud
4242
_BUILD_GIT_URL=https://github.com/appwrite/website.git
4343
_BUILD_GIT_BRANCH=main

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ jobs:
4242
labels: ${{ steps.meta.outputs.labels }}
4343
build-args: |
4444
_BUILD_WEBSITE_URL=https://appwrite.io
45-
_BUILD_WEBSITE_VERSION=1.6.x
45+
_BUILD_WEBSITE_VERSION=cloud
4646
_BUILD_GIT_URL=https://github.com/appwrite/website.git
4747
_BUILD_GIT_BRANCH=main

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ You can build the docker image and run it with docker compose:
5050
```bash
5151
docker compose build \
5252
--build-arg _BUILD_WEBSITE_URL=https://appwrite.io \
53-
--build-arg _BUILD_WEBSITE_VERSION=1.6.x \
53+
--build-arg _BUILD_WEBSITE_VERSION=cloud \
5454
--build-arg _BUILD_GIT_URL=https://github.com/appwrite/website.git \
5555
--build-arg _BUILD_GIT_BRANCH=main
5656

57-
docker compose up
57+
docker compose up -d
5858
```
5959

6060
### 6. Linting and Formatting

scripts/git-sources.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ await execa("git", ["config", "core.sparseCheckout", "true"], {
4040
});
4141

4242
await execa("git", ["checkout", GIT_BRANCH], { cwd: LOCAL_PATH });
43-
await execa("rm", ["-rf", `${LOCAL_PATH}/.git`]);
43+
await execa("rm", ["-rf", `${LOCAL_PATH}/.git`]);

scripts/web-sources.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const SERVICES = [
4848
"functions",
4949
"locale",
5050
"messaging",
51+
"sites",
5152
"storage",
5253
"teams",
5354
"users",

src/documents.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const getDocumentation = async () => {
4444
*/
4545
const getReferences = async () => {
4646
const filenames = await glob(["./sources/references/**/*.md"]);
47+
const version = process.env._BUILD_WEBSITE_VERSION ?? "cloud";
4748

4849
return Promise.all(
4950
filenames.map(async (filename) => {
@@ -52,7 +53,7 @@ const getReferences = async () => {
5253
const { sdk, service } = parseReferenceData(filename);
5354
const metadata = {
5455
filename,
55-
url: `https://appwrite.io/docs/references/cloud/${sdk}/${service}`,
56+
url: `https://appwrite.io/docs/references/${version}/${sdk}/${service}`,
5657
};
5758

5859
return new Document({
@@ -64,8 +65,10 @@ const getReferences = async () => {
6465
};
6566

6667
export const getDocuments = async () => {
67-
const documentation = await getDocumentation();
68-
const references = await getReferences();
68+
const [documentation, references] = await Promise.all([
69+
getDocumentation(),
70+
getReferences(),
71+
]);
6972

7073
return await splitDocuments([...documentation, ...references]);
7174
};

src/embeddings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { getDocuments } from "./documents.js";
77
/**
88
* @returns {Promise<VectorStoreRetriever<HNSWLib>>}
99
*/
10-
export const intializeDocumentRetriever = async () => {
10+
export const initializeDocumentRetriever = async () => {
1111
const embeddings = new OpenAIEmbeddings({
1212
openAIApiKey: process.env._APP_ASSISTANT_OPENAI_API_KEY,
1313
});

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import express from "express";
55
import {
66
getRagChain,
77
getOpenAIChat,
8-
intializeDocumentRetriever as initializeRetriever,
8+
initializeDocumentRetriever as initializeRetriever,
99
} from "./embeddings.js";
1010

1111
const app = express();

0 commit comments

Comments
 (0)