Skip to content

TDengine case docs #30495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 26, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
mkdocs workflow test
  • Loading branch information
minhuinie committed Mar 26, 2025
commit 264f2435173a63ff0882f473b5ebad8c25f90418
21 changes: 12 additions & 9 deletions .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
env:
ALL_CHANGED_FILES: ${{ steps.changed-case-files.outputs.all_changed_files }}
run: |
modified_flag=false
mkdir -p test/docs/case_list_docs
for file in ${ALL_CHANGED_FILES}; do
echo "Processing $file"
Expand All @@ -83,17 +84,20 @@ jobs:
if [ ! -f "$markdown_file" ]; then
echo "Generating $markdown_file"
echo "::: ${module_path}" > "$markdown_file"
modified_flag=true
else
echo "Appending to $markdown_file"
if ! grep -q "::: ${module_path}" "$markdown_file"; then
echo "::: ${module_path}" >> "$markdown_file"
modified_flag=true
else
echo "Content already exists in $markdown_file"
fi
fi
echo "End $file. markdown_file: $markdown_file"
echo "End $file. markdown_file: $markdown_file. modified_flag: $modified_flag"
cat $markdown_file
done
echo "modified_flag=$modified_flag" >> $GITHUB_ENV
shell: bash

- name: Deploy Documentation with Mike
Expand All @@ -107,18 +111,17 @@ jobs:
mike deploy --push --update-aliases $BRANCH_NAME latest --config-file mkdocs.yml --branch gh-pages --allow-empty
mike set-default --push --branch gh-pages latest --allow-empty

- name: Debug modified_flag
run: echo "modified_flag=$modified_flag"

- name: Commit and Push Updated Docs to gh-pages
if: env.modified_flag == 'true'
run: |
git fetch origin gh-pages
git checkout gh-pages || git checkout -b gh-pages
echo test/docs/$BRANCH_NAME
mkdir -p test/docs/$BRANCH_NAME
cp -r test/docs/case_list_docs test/docs/$BRANCH_NAME/
# Check if there are any changes to commit
if git diff --quiet; then
echo "No changes detected, skipping commit."
else
git add test/docs/$BRANCH_NAME
git commit -m "Update test/docs for branch $BRANCH_NAME"
git push origin gh-pages
fi
git add test/docs/$BRANCH_NAME
git commit -m "Update test/docs for branch $BRANCH_NAME"
git push origin gh-pages
2 changes: 1 addition & 1 deletion test/cases/data_write/sql_statement/test_insert_double.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def test_insert_double(self): # sourcery skip: extract-duplicate-method, remove

Labels: common,ci

Jira: None
Jira: None

History:
- 2024-2-6 Feng Chao Created
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_five_dnode_three_mnode(self):

Labels: cluster,ci

Jira: None
Jira: None

History:
- 2024-2-6 Feng Chao Created
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def test_check_cluster_with_db(self):

Labels: cluster

Jira: None
Jira: None

History:
- 2024-2-6 Feng Chao Created
Expand Down