Skip to content

Commit

Permalink
fix: docs deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
MoritzLaurer committed Dec 12, 2024
1 parent 798c175 commit 7944d87
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,21 @@ jobs:
exit 0
fi
# For push events, check if this is the first push
if [ -z "${{ github.event.before }}" ]; then
echo "should_deploy=true" >> $GITHUB_OUTPUT
exit 0
fi
# Check for changes in relevant files
git diff --name-only ${{ github.event.before }} ${{ github.event.after }} > changed_files.txt
# Debug output
echo "Changed files:"
cat changed_files.txt
# Look for changes in docs, mkdocs.yml, or Python files
if grep -q -E '^docs/|^mkdocs.yml|\.py$' changed_files.txt; then
if grep -q -E '^docs/|^mkdocs\.yml|\.py$' changed_files.txt; then
echo "should_deploy=true" >> $GITHUB_OUTPUT
else
echo "should_deploy=false" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 7944d87

Please sign in to comment.