Skip to content
Merged
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
59 changes: 59 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Deploy Documentation to Cloud Run

on:
push:
branches:
- docs-release
workflow_dispatch:

env:
REGION: us-central1
GAR_HOSTNAME: us-central1-docker.pkg.dev
PROJECT_ID: drivecore-primary
SERVICE_NAME: mycoder-docs

jobs:
deploy:
name: Deploy to Cloud Run
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Google Auth
id: auth
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}

- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2

- name: Configure Docker for GCP
run: |
gcloud auth configure-docker $GAR_HOSTNAME --quiet

- name: Set image path
run: echo "IMAGE_PATH=$GAR_HOSTNAME/$PROJECT_ID/shared-docker-registry/$SERVICE_NAME:${{ github.sha }}" >> $GITHUB_ENV

- name: Build and push Docker container
run: |
cd packages/docs
docker build -t ${{ env.IMAGE_PATH }} .
docker push ${{ env.IMAGE_PATH }}

- name: Deploy to Cloud Run
id: deploy
uses: google-github-actions/deploy-cloudrun@v2
with:
service: ${{ env.SERVICE_NAME }}
region: ${{ env.REGION }}
image: ${{ env.IMAGE_PATH }}
flags: '--allow-unauthenticated'

- name: Show Output
run: echo ${{ steps.deploy.outputs.url }}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@ runs
data
internal_docs
.DS_Store

# Docusaurus specific
.docusaurus
.cache-loader
packages/docs/build
packages/docs/.env.local
packages/docs/.env.development.local
packages/docs/.env.test.local
packages/docs/.env.production.local
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ eslint.config.js
pnpm-lock.yaml
tsconfig.json
vitest.config.js
build
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ Examples:

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

## Development

Expand Down
2 changes: 2 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ export default ts.config(
'**/pnpm-lock.yaml',
'**/routeTree.gen.ts',
'scripts/verify-release-config.js',
'**/.docusaurus',
'**/build',
],
},
);
40 changes: 40 additions & 0 deletions packages/docs/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Dependencies
node_modules
.pnp
.pnp.js

# Build outputs
build
.docusaurus
dist
coverage

# Git and GitHub
.git
.github

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

# Logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Docker
Dockerfile
.dockerignore

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
26 changes: 26 additions & 0 deletions packages/docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM node:20-alpine

WORKDIR /app

# Install pnpm
RUN npm install -g pnpm

# Copy package.json and lock files
COPY package.json pnpm-lock.yaml ./

# Install dependencies
RUN pnpm install --frozen-lockfile

# Copy the rest of the application
COPY . .

# Build the Docusaurus site
ENV NODE_ENV=production
RUN pnpm build

# Expose the port the app will run on
ENV PORT=8080
EXPOSE ${PORT}

# Command to run the application
CMD ["pnpm", "serve", "--port", "8080", "--no-open"]
60 changes: 60 additions & 0 deletions packages/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# MyCoder Documentation

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.

## What's Inside

- **Product Documentation**: Comprehensive guides on how to use MyCoder
- **Getting Started**: Platform-specific setup instructions for Windows, macOS, and Linux
- **Usage Guides**: Detailed information on features and capabilities
- **Blog**: Updates, tutorials, and insights about MyCoder

## Development

### Prerequisites

- Node.js version 18.0 or above
- pnpm (recommended)

### Local Development

```bash
# Navigate to the docs package
cd packages/docs

# Start the development server
pnpm start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```bash
# Generate static content
pnpm build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

The documentation site is automatically deployed when changes are pushed to the `docs-release` branch.

## Contributing

We welcome contributions to improve the documentation:

1. Create a feature branch (`git checkout -b feature/amazing-improvement`)
2. Make your changes
3. Commit your changes (`git commit -m 'Add some amazing improvement'`)
4. Push to the branch (`git push origin feature/amazing-improvement`)
5. Open a Pull Request

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Contact

If you have questions or feedback, please join our [Discord community](https://discord.gg/5K6TYrHGHt).
Loading
Loading