Skip to content

Commit 45c85d5

Browse files
vdusekclaude
andcommitted
refactor: Use .gitignore instead of explicit cleanup for versioned docs artifacts
Add gitignore patterns for changelog.md, pyproject.toml, and .gitignore inside website/versioned_docs/ so git add never stages them. This replaces the explicit rm commands in the workflow since .ruff_cache and .ty_cache are already covered by global patterns. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d35d695 commit 45c85d5

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

.github/workflows/manual_version_docs.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,6 @@ jobs:
112112
uv run npx docusaurus docs:version "$MAJOR_MINOR"
113113
uv run npx docusaurus api:version "$MAJOR_MINOR"
114114
115-
# Clean up non-docs artifacts from the snapshot.
116-
rm -f "versioned_docs/version-${MAJOR_MINOR}/changelog.md"
117-
rm -f "versioned_docs/version-${MAJOR_MINOR}/pyproject.toml"
118-
rm -f "versioned_docs/version-${MAJOR_MINOR}/.gitignore"
119-
rm -rf "versioned_docs/version-${MAJOR_MINOR}/.ruff_cache"
120-
rm -rf "versioned_docs/version-${MAJOR_MINOR}/.ty_cache"
121-
122115
- name: Commit and push versioned docs
123116
id: commit_versioned_docs
124117
uses: EndBug/add-and-commit@v10

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ Session.vim
6363

6464
# Docs
6565
docs/changelog.md
66+
website/versioned_docs/*/changelog.md
67+
website/versioned_docs/*/pyproject.toml
68+
website/versioned_docs/*/.gitignore
6669

6770
# Website build artifacts, node dependencies
6871
website/build

0 commit comments

Comments
 (0)