Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

Commit

Permalink
feat: add env
Browse files Browse the repository at this point in the history
  • Loading branch information
kjxbyz committed Oct 28, 2023
1 parent aa772e5 commit 3cf9d71
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
VERCEL_GIT_COMMIT_SHA=
NEXT_PUBLIC_GOOGLE_ID=
NEXT_PUBLIC_GH_TOKEN=
NEXT_PUBLIC_GH_REPO_OWNER=
NEXT_PUBLIC_GH_REPO=
4 changes: 2 additions & 2 deletions docs/app/api/releases/latest/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const octokit = new Octokit({
export async function GET() {
try {
const latestRelease = await octokit.repos.getLatestRelease({
owner: "cyf",
repo: "faforever-next",
owner: process.env.NEXT_PUBLIC_GH_REPO_OWNER,
repo: process.env.NEXT_PUBLIC_GH_REPO,
});

return Response.json(
Expand Down
2 changes: 2 additions & 0 deletions docs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const nextConfig = {
VERCEL_GIT_COMMIT_SHA: process.env.VERCEL_GIT_COMMIT_SHA,
NEXT_PUBLIC_GOOGLE_ID: process.env.NEXT_PUBLIC_GOOGLE_ID,
NEXT_PUBLIC_GH_TOKEN: process.env.NEXT_PUBLIC_GH_TOKEN,
NEXT_PUBLIC_GH_REPO_OWNER: process.env.NEXT_PUBLIC_GH_REPO_OWNER,
NEXT_PUBLIC_GH_REPO: process.env.NEXT_PUBLIC_GH_REPO,
},
};

Expand Down
2 changes: 2 additions & 0 deletions docs/process.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ declare namespace NodeJS {
VERCEL_GIT_COMMIT_SHA: string;
NEXT_PUBLIC_GOOGLE_ID: string;
NEXT_PUBLIC_GH_TOKEN: string;
NEXT_PUBLIC_GH_REPO_OWNER: string;
NEXT_PUBLIC_GH_REPO: string;
}
}

0 comments on commit 3cf9d71

Please sign in to comment.