Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0351318
* feat(chat): Add semantic search crate to Q CLI (#1860)
kensave May 17, 2025
89d2a34
fix Build (#1876)
kensave May 17, 2025
d9f5051
Kensave/flakey test fix (#1877)
kensave May 17, 2025
0a4530a
fix: Removes flaky tests (#1878)
kensave May 17, 2025
285f8d6
feat: Add documentation automation pipeline
mibeco May 17, 2025
418913c
feat: Add GitHub Actions workflow for documentation
mibeco May 17, 2025
b22e581
test: Add comment to trigger documentation generation
mibeco May 17, 2025
84835a9
fix: Update GitHub Actions to latest versions
mibeco May 18, 2025
2334037
fix: Add missing dependencies to React hooks
mibeco May 18, 2025
6bbe0aa
feat: Add CDK infrastructure for documentation website
mibeco May 18, 2025
1b5bd22
feat: Add enhanced documentation extraction script with parameter det…
mibeco May 18, 2025
8ceef00
docs: Update chat command description for better documentation
mibeco May 18, 2025
0a6a1c7
fix: Add missing dependencies to React hooks to resolve linting errors
mibeco May 18, 2025
e167004
feat: Add mdBook documentation infrastructure and GitHub Actions work…
mibeco May 18, 2025
bad4423
test: Add test comment to trigger documentation pipeline
mibeco May 18, 2025
67471cb
feat: Add LLM-enhanced documentation generation
mibeco May 18, 2025
da4bfab
feat: Add Bedrock-enhanced documentation generation
mibeco May 18, 2025
36c86ed
fix: Remove duplicate enhancement step in workflow
mibeco May 18, 2025
4ec9d00
feat: Update to use Claude 3 Sonnet model for documentation enhancement
mibeco May 18, 2025
833eb12
fix: Update Claude 3 Sonnet API format to use messages instead of prompt
mibeco May 18, 2025
97b3579
fix: Fix syntax error in enhance_docs_bedrock.py script
mibeco May 18, 2025
22c5254
feat: Update to use Claude 3.5 Sonnet model for documentation enhance…
mibeco May 18, 2025
f92ca04
fix: Explicitly specify Claude 3.5 Sonnet model in documentation work…
mibeco May 19, 2025
02516da
fix: Update GitHub workflow to include documentation enhancement with…
mibeco May 20, 2025
2ed556d
fix: Resolve merge conflicts in documentation workflow
mibeco May 20, 2025
a4ea8b7
fix: Update workflow to use PERSONAL_ACCESS_TOKEN instead of GITHUB_T…
mibeco May 20, 2025
923632e
fix: Simplify workflow and remove unnecessary preview deployment
mibeco May 21, 2025
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
149 changes: 149 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
name: Documentation

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install markdown pyyaml

- name: Generate documentation
run: |
mkdir -p docs/generated
python scripts/extract_docs.py

# Add the documentation enhancement steps
- name: Install documentation enhancement dependencies
run: python -m pip install boto3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2

- name: Enhance documentation with Bedrock
run: |
mkdir -p docs/enhanced
python scripts/enhance_docs_bedrock.py --input-dir docs/generated --code-dir . --output-dir docs/enhanced --model anthropic.claude-3-5-sonnet-20240620-v1:0

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Install mdBook
run: |
cargo install mdbook

- name: Setup mdBook structure
run: |
mkdir -p docs/src
# Use enhanced docs instead of generated docs
cp -r docs/enhanced/* docs/src/

# Create book.toml
cat > docs/book.toml << EOF
[book]
title = "Amazon Q Developer CLI Documentation"
authors = ["AWS"]
description = "Documentation for the Amazon Q Developer CLI"
src = "src"

[output.html]
git-repository-url = "https://github.com/aws/amazon-q-developer-cli"
git-repository-icon = "fa-github"
site-url = "/"
EOF

# Create SUMMARY.md
echo "# Summary" > docs/src/SUMMARY.md
echo "" >> docs/src/SUMMARY.md
echo "[Introduction](README.md)" >> docs/src/SUMMARY.md
echo "" >> docs/src/SUMMARY.md
echo "# Commands" >> docs/src/SUMMARY.md

# Add all command files to SUMMARY.md
find docs/src -name "*.md" -not -path "*/\.*" -not -name "SUMMARY.md" -not -name "README.md" | sort | while read -r file; do
filename=$(basename "$file")
title=$(head -n 1 "$file" | sed 's/^# //')
if [ "$filename" != "index.md" ]; then
echo "- [$title]($filename)" >> docs/src/SUMMARY.md
fi
done

# Create README.md if it doesn't exist
if [ ! -f "docs/src/README.md" ]; then
if [ -f "docs/src/index.md" ]; then
cp docs/src/index.md docs/src/README.md
else
cat > docs/src/README.md << EOF
# Amazon Q Developer CLI Documentation

Welcome to the Amazon Q Developer CLI documentation. This site contains reference documentation for all Amazon Q CLI commands.

## Available Commands

See the sidebar for a complete list of available commands.
EOF
fi
fi

- name: Build mdBook
run: |
cd docs && mdbook build

- name: Upload documentation artifact
uses: actions/upload-artifact@v3
with:
name: documentation
path: docs/book

deploy-infrastructure:
needs: build-docs
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3

- name: Download documentation artifact
uses: actions/download-artifact@v3
with:
name: documentation
path: docs/book

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Install CDK dependencies
run: |
cd infrastructure
npm install

- name: Deploy CDK stack
run: |
cd infrastructure
npm run cdk deploy -- --require-approval never
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-west-2
2 changes: 2 additions & 0 deletions .github/workflows/typos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ jobs:
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/typos@master
with:
config: .typos.toml
2 changes: 1 addition & 1 deletion .lintstagedrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export default {
],
"*.py": ["ruff format --check", "ruff check"],
"*.{ts,js,tsx,jsx,mjs}": "prettier --check",
"!(*test*)*": "typos",
"!(*test*)*": "typos --config .typos.toml",
};
4 changes: 4 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[files]

[default.extend-words]
mmaped = "mmaped"
Loading