Skip to content

Commit 7df3c3a

Browse files
committed
CI: revert workflow changes
1 parent 59a9aca commit 7df3c3a

File tree

1 file changed

+1
-51
lines changed

1 file changed

+1
-51
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -3,75 +3,25 @@ on:
33
push:
44
branches:
55
- main
6-
paths:
7-
- "docs/**"
8-
- "mkdocs.yml"
9-
- ".github/workflows/docs.yml"
10-
- "**/*.py" # Watch all Python files
116
pull_request:
127
branches:
138
- main
14-
paths:
15-
- "docs/**"
16-
- "mkdocs.yml"
17-
- ".github/workflows/docs.yml"
18-
- "**/*.py" # Watch all Python files
19-
209
permissions:
2110
contents: write
22-
2311
jobs:
2412
Docs:
2513
runs-on: ubuntu-latest
2614
steps:
2715
- uses: actions/checkout@v4
28-
with:
29-
fetch-depth: 0 # Fetch all history for comparing changes
30-
31-
- name: Check for docstring changes
32-
id: check_changes
33-
run: |
34-
# Get the last two commits
35-
CHANGED_FILES=$(git diff --name-only HEAD^ HEAD)
36-
37-
# Check if docs files changed directly
38-
if echo "$CHANGED_FILES" | grep -q -E "^docs/|mkdocs.yml"; then
39-
echo "Direct documentation changes found"
40-
echo "should_deploy=true" >> $GITHUB_OUTPUT
41-
exit 0
42-
fi
43-
44-
# Check Python files for docstring changes
45-
for file in $(echo "$CHANGED_FILES" | grep '\.py$'); do
46-
if [ -f "$file" ]; then
47-
if git diff HEAD^ HEAD "$file" | grep -q '^[+-][\t ]*['"'"'\"]\{3\}'; then
48-
echo "Docstring changes found in $file"
49-
echo "should_deploy=true" >> $GITHUB_OUTPUT
50-
exit 0
51-
fi
52-
fi
53-
done
54-
55-
echo "No relevant changes found"
56-
echo "should_deploy=false" >> $GITHUB_OUTPUT
57-
5816
- uses: actions/setup-python@v5
59-
if: steps.check_changes.outputs.should_deploy == 'true'
6017
with:
6118
python-version: 3.x
62-
6319
- uses: actions/cache@v4
64-
if: steps.check_changes.outputs.should_deploy == 'true'
6520
with:
6621
key: ${{github.ref}}
6722
path: .cache
68-
6923
- name: Install dependencies
70-
if: steps.check_changes.outputs.should_deploy == 'true'
7124
run: |
7225
python -m pip install --upgrade pip
7326
pip install mkdocs-material mkdocstrings-python mkdocs-include-markdown-plugin
74-
75-
- name: Deploy docs
76-
if: steps.check_changes.outputs.should_deploy == 'true'
77-
run: mkdocs gh-deploy --force
27+
- run: mkdocs gh-deploy --force

0 commit comments

Comments
 (0)