Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

chore: Doc CI enhance (#2565)

Tao Sun53f48a26e674
diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml
index 9afbfcdb2..de37f3c85 100644
--- a/.github/workflows/documentation.yml
+++ b/.github/workflows/documentation.yml
@@ -16,8 +16,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
- fetch-depth: 0 # Full history for git diff
- token: ${{ secrets.GITHUB_TOKEN }}
+ fetch-depth: 0
+ persist-credentials: false
- name: Set up Python environment and install dependencies
uses: ./.github/actions/camel_install
@@ -30,7 +30,6 @@ jobs:
- name: Convert Cookbooks and Update Mintlify Config
run: |
source .venv/bin/activate
-
if [ "${{ github.event_name }}" = "push" ]; then
echo "Push event detected - using incremental mode for cookbooks"
python docs/mintlify/convert_notebook2mdx.py \
@@ -50,12 +49,10 @@ jobs:
--update-docs-json docs/mintlify/docs.json \
--docs-path-prefix "" \
--verbose
- fi
- name: Convert Get Started docs
run: |
source .venv/bin/activate
-
if [ "${{ github.event_name }}" = "push" ]; then
echo "Push event detected - using incremental mode for get_started"
python docs/mintlify/convert_notebook2mdx.py \
@@ -75,12 +72,10 @@ jobs:
--update-docs-json docs/mintlify/docs.json \
--docs-path-prefix "" \
--verbose
- fi
- name: Convert Key Modules docs
run: |
source .venv/bin/activate
-
if [ "${{ github.event_name }}" = "push" ]; then
echo "Push event detected - using incremental mode for key_modules"
python docs/mintlify/convert_notebook2mdx.py \
@@ -100,7 +95,6 @@ jobs:
--update-docs-json docs/mintlify/docs.json \
--docs-path-prefix "" \
--verbose
- fi
- name: Generate API Documentation
run: |
@@ -114,9 +108,11 @@ jobs:
--since_hours 24
- name: Commit and push changes
+ env:
+ PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
- git config --local user.email "[email protected]"
- git config --local user.name "GitHub Action"
+ git config --global user.email "[email protected]"
+ git config --global user.name "GitHub Action"
git add docs/mintlify/ docs/mintlify/get_started/ docs/mintlify/key_modules/ docs/mintlify/reference/ docs/mintlify/docs.json
@@ -124,5 +120,6 @@ jobs:
echo "No changes to commit"
else
git commit -m "Auto-update documentation after merge"
+ git remote set-url origin https://x-access-token:${PAT_TOKEN}@github.com/${{ github.repository }}
git push origin ${{ github.ref_name }}
fi
diff --git a/docs/cookbooks/advanced_features/agents_tracking.ipynb b/docs/cookbooks/advanced_features/agents_tracking.ipynb
index 3d1f16d8b..19564b88e 100644
--- a/docs/cookbooks/advanced_features/agents_tracking.ipynb
+++ b/docs/cookbooks/advanced_features/agents_tracking.ipynb
@@ -147,7 +147,7 @@
],
"source": [
"# Prompt for the AgentOps API key securely\n",
- "agentops_api_key = getpass('Enter your API key: ')\n",
+ "agentops_api_key = getpass('Enter your API key:')\n",
"os.environ[\"AGENTOPS_API_KEY\"] = agentops_api_key"
]
},