Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,40 @@ jobs:
- uses: actions/checkout@v3

# Build Docusaurus
- name: Setup node
uses: actions/setup-node@v3
- name: Cache Bun dependencies
uses: actions/cache@v4
with:
node-version: "18"
cache: "npm"
cache-dependency-path: "docs/package-lock.json"
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('docs/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Cache docusaurus
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/docs/.docusaurus
docs/.docusaurus
key: |
${{ runner.os }}-docusaurus
restore-keys: |
${{ runner.os }}-docusaurus
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3"

- name: Install dependencies
run: |
npm ci --prefix docs
bun ci --cwd docs
- name: Lint / Formatting
run: |
npm run typecheck --prefix docs
bun run --cwd docs typecheck
# TODO: should add more in the future if needed
- name: Build
run: |
npm run build --prefix docs
bun run --cwd docs build
# Fetch API documentation
- uses: aica-technology/.github/.github/actions/login-to-ghcr@v0.6.1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.idea
.DS_Store
**/node_modules
3 changes: 0 additions & 3 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Dependencies
/node_modules

# Production
/build

Expand Down
8 changes: 4 additions & 4 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM node:lts
FROM oven/bun:1.3

WORKDIR /docs
COPY . .
RUN --mount=type=cache,target=/root/.npm npm install
RUN --mount=type=cache,target=/docs/.docusaurus npm run build
CMD npm run start:docker
RUN --mount=type=cache,target=/root/.bun bun install
RUN --mount=type=cache,target=/docs/.docusaurus bun run build
CMD ["bun", "run", "start:docker"]
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ import Example from './assets/exalidraw-example-embedded.svg';
### Installation

```
$ npm install
$ bun install
```

### Development

```
$ npm start
$ bun run start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without
Expand All @@ -126,7 +126,7 @@ having to restart the server.
### Build

```
$ npm run build
$ bun run build
```

This command generates static content into the `build` directory and can be served using any static contents hosting
Expand All @@ -140,7 +140,7 @@ You can build and see the documentation through Docker for ease of setup. Simply
docker compose up --build
```

You can then access the docs at [http://localhost:3333](http://localhost:3333).
You can then access the docs at [http://localhost:3000](http://localhost:3000).

## Deployment

Expand Down
2,518 changes: 2,518 additions & 0 deletions docs/bun.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/bunfig.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[run]
# equivalent to `bun --bun` for all `bun run` commands
bun = true
2 changes: 1 addition & 1 deletion docs/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ services:
image: aica-docs
build: .
ports:
- "3333:3000"
- "3000:3000"
volumes:
- .:/docs
Loading