Skip to content

Commit 29f71de

Browse files
authored
Merge pull request #254 from drivecore/feat/integrate-docs-253
feat: integrate mycoder-docs repository into monorepo
2 parents 278a3c3 + a98caad commit 29f71de

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+16890
-3356
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Deploy Documentation to Cloud Run
2+
3+
on:
4+
push:
5+
branches:
6+
- docs-release
7+
workflow_dispatch:
8+
9+
env:
10+
REGION: us-central1
11+
GAR_HOSTNAME: us-central1-docker.pkg.dev
12+
PROJECT_ID: drivecore-primary
13+
SERVICE_NAME: mycoder-docs
14+
15+
jobs:
16+
deploy:
17+
name: Deploy to Cloud Run
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
id-token: write
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Google Auth
28+
id: auth
29+
uses: google-github-actions/auth@v2
30+
with:
31+
credentials_json: ${{ secrets.GCP_SA_KEY }}
32+
33+
- name: Set up Cloud SDK
34+
uses: google-github-actions/setup-gcloud@v2
35+
36+
- name: Configure Docker for GCP
37+
run: |
38+
gcloud auth configure-docker $GAR_HOSTNAME --quiet
39+
40+
- name: Set image path
41+
run: echo "IMAGE_PATH=$GAR_HOSTNAME/$PROJECT_ID/shared-docker-registry/$SERVICE_NAME:${{ github.sha }}" >> $GITHUB_ENV
42+
43+
- name: Build and push Docker container
44+
run: |
45+
cd packages/docs
46+
docker build -t ${{ env.IMAGE_PATH }} .
47+
docker push ${{ env.IMAGE_PATH }}
48+
49+
- name: Deploy to Cloud Run
50+
id: deploy
51+
uses: google-github-actions/deploy-cloudrun@v2
52+
with:
53+
service: ${{ env.SERVICE_NAME }}
54+
region: ${{ env.REGION }}
55+
image: ${{ env.IMAGE_PATH }}
56+
flags: '--allow-unauthenticated'
57+
58+
- name: Show Output
59+
run: echo ${{ steps.deploy.outputs.url }}

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,12 @@ runs
55
data
66
internal_docs
77
.DS_Store
8+
9+
# Docusaurus specific
10+
.docusaurus
11+
.cache-loader
12+
packages/docs/build
13+
packages/docs/.env.local
14+
packages/docs/.env.development.local
15+
packages/docs/.env.test.local
16+
packages/docs/.env.production.local

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ eslint.config.js
1212
pnpm-lock.yaml
1313
tsconfig.json
1414
vitest.config.js
15+
build

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ Examples:
110110

111111
- [mycoder](packages/cli) - Command-line interface for MyCoder
112112
- [mycoder-agent](packages/agent) - Agent module for MyCoder
113+
- [mycoder-docs](packages/docs) - Documentation website for MyCoder
113114

114115
## Development
115116

eslint.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ export default ts.config(
7676
'**/pnpm-lock.yaml',
7777
'**/routeTree.gen.ts',
7878
'scripts/verify-release-config.js',
79+
'**/.docusaurus',
80+
'**/build',
7981
],
8082
},
8183
);

packages/docs/.dockerignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Dependencies
2+
node_modules
3+
.pnp
4+
.pnp.js
5+
6+
# Build outputs
7+
build
8+
.docusaurus
9+
dist
10+
coverage
11+
12+
# Git and GitHub
13+
.git
14+
.github
15+
16+
# Misc
17+
.DS_Store
18+
.env.local
19+
.env.development.local
20+
.env.test.local
21+
.env.production.local
22+
23+
# Logs
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
pnpm-debug.log*
28+
29+
# Docker
30+
Dockerfile
31+
.dockerignore
32+
33+
# Editor directories and files
34+
.idea
35+
.vscode
36+
*.suo
37+
*.ntvs*
38+
*.njsproj
39+
*.sln
40+
*.sw?

packages/docs/Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM node:20-alpine
2+
3+
WORKDIR /app
4+
5+
# Install pnpm
6+
RUN npm install -g pnpm
7+
8+
# Copy package.json and lock files
9+
COPY package.json pnpm-lock.yaml ./
10+
11+
# Install dependencies
12+
RUN pnpm install --frozen-lockfile
13+
14+
# Copy the rest of the application
15+
COPY . .
16+
17+
# Build the Docusaurus site
18+
ENV NODE_ENV=production
19+
RUN pnpm build
20+
21+
# Expose the port the app will run on
22+
ENV PORT=8080
23+
EXPOSE ${PORT}
24+
25+
# Command to run the application
26+
CMD ["pnpm", "serve", "--port", "8080", "--no-open"]

packages/docs/README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# MyCoder Documentation
2+
3+
This package contains the official documentation for MyCoder, an AI-powered coding assistant. The documentation is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
## What's Inside
6+
7+
- **Product Documentation**: Comprehensive guides on how to use MyCoder
8+
- **Getting Started**: Platform-specific setup instructions for Windows, macOS, and Linux
9+
- **Usage Guides**: Detailed information on features and capabilities
10+
- **Blog**: Updates, tutorials, and insights about MyCoder
11+
12+
## Development
13+
14+
### Prerequisites
15+
16+
- Node.js version 18.0 or above
17+
- pnpm (recommended)
18+
19+
### Local Development
20+
21+
```bash
22+
# Navigate to the docs package
23+
cd packages/docs
24+
25+
# Start the development server
26+
pnpm start
27+
```
28+
29+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
30+
31+
### Build
32+
33+
```bash
34+
# Generate static content
35+
pnpm build
36+
```
37+
38+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
39+
40+
### Deployment
41+
42+
The documentation site is automatically deployed when changes are pushed to the `docs-release` branch.
43+
44+
## Contributing
45+
46+
We welcome contributions to improve the documentation:
47+
48+
1. Create a feature branch (`git checkout -b feature/amazing-improvement`)
49+
2. Make your changes
50+
3. Commit your changes (`git commit -m 'Add some amazing improvement'`)
51+
4. Push to the branch (`git push origin feature/amazing-improvement`)
52+
5. Open a Pull Request
53+
54+
## License
55+
56+
This project is licensed under the MIT License - see the LICENSE file for details.
57+
58+
## Contact
59+
60+
If you have questions or feedback, please join our [Discord community](https://discord.gg/5K6TYrHGHt).

0 commit comments

Comments
 (0)