Skip to content

Commit

Permalink
chore: Add docs to monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
matvp91 authored Oct 19, 2024
1 parent c59eca6 commit 521fe92
Show file tree
Hide file tree
Showing 15 changed files with 705 additions and 173 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy Docs to GitHub Pages

on:
push:
branches: [main]
branches: [main, docs]
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
Expand All @@ -28,20 +28,23 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v3
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci
run: pnpm --filter "docs" install
- name: Build with VitePress
run: npm run build
run: pnpm --filter "docs" build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/.vitepress/dist
path: docs/.vitepress/dist

deploy:
environment:
name: github-pages
Expand Down
153 changes: 0 additions & 153 deletions docs/package-lock.json

This file was deleted.

5 changes: 2 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"dev": "vitepress dev",
"build": "vitepress build"
},
"dependencies": {
"vitepress": "^1.3.2",
"vue": "^3.5.12"
"devDependencies": {
"vitepress": "^1.3.2"
}
}
2 changes: 1 addition & 1 deletion packages/api/src/env.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { parseEnv } from "shared";
import { parseEnv } from "shared/env";

export const env = parseEnv((t) => ({
// process
Expand Down
6 changes: 3 additions & 3 deletions packages/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
LangCodeSchema,
VideoCodecSchema,
AudioCodecSchema,
scalarCustomCss,
} from "shared";
} from "shared/typebox";
import { customCss } from "shared/scalar";
import { env } from "./env";
import { getJob, getJobs, getJobLogs } from "./jobs";
import { getStorageFolder, getStorageFile } from "./s3";
Expand All @@ -30,7 +30,7 @@ const app = new Elysia()
},
scalarConfig: {
hideDownloadButton: true,
customCss: scalarCustomCss,
customCss,
},
}),
)
Expand Down
2 changes: 1 addition & 1 deletion packages/artisan/src/consumer/env.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { parseEnv } from "shared";
import { parseEnv } from "shared/env";

export const env = parseEnv((t) => ({
// config.env
Expand Down
2 changes: 1 addition & 1 deletion packages/artisan/src/producer/env.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { parseEnv } from "shared";
import { parseEnv } from "shared/env";

export const env = parseEnv((t) => ({
// config.env
Expand Down
2 changes: 1 addition & 1 deletion packages/artisan/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LangCode, VideoCodec, AudioCodec } from "shared";
import type { LangCode, VideoCodec, AudioCodec } from "shared/typebox";

export type Stream =
| {
Expand Down
2 changes: 1 addition & 1 deletion packages/dashboard/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineConfig, Plugin } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
import { fileURLToPath } from "url";
import { parseEnv } from "shared";
import { parseEnv } from "shared/env";

// When we inject new PUBLIC_ variables, make sure to add them
// in src/globals.d.ts too. All of these are optional because we
Expand Down
6 changes: 5 additions & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
"private": true,
"version": "1.0.0",
"type": "module",
"main": "./src/index.ts",
"exports": {
"./env": "./src/env.ts",
"./scalar": "./src/scalar.ts",
"./typebox": "./src/typebox.ts"
},
"scripts": {
"lint": "eslint"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/scalar.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const scalarCustomCss = `
export const customCss = `
.scalar-container.z-overlay {
padding-left: 16px;
padding-right: 16px;
Expand Down
2 changes: 1 addition & 1 deletion packages/stitcher/src/env.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { parseEnv } from "shared";
import { parseEnv } from "shared/env";

export const env = parseEnv((t) => ({
// process
Expand Down
4 changes: 2 additions & 2 deletions packages/stitcher/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Elysia, t } from "elysia";
import { cors } from "@elysiajs/cors";
import { swagger } from "@elysiajs/swagger";
import { scalarCustomCss } from "shared";
import { customCss } from "shared/scalar";
import { env } from "./env";
import { createSession } from "./session";
import { validateFilter } from "./filters";
Expand All @@ -26,7 +26,7 @@ const app = new Elysia()
},
scalarConfig: {
hideDownloadButton: true,
customCss: scalarCustomCss,
customCss,
},
}),
)
Expand Down
Loading

0 comments on commit 521fe92

Please sign in to comment.