Skip to content

Commit

Permalink
checking if docs are modified when a PR merged to the master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
uguraslan committed Nov 19, 2024
1 parent 6fda7f7 commit 1e831f3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: Check for changes in docs folder
id: check_docs_changes
run: |
if git diff --name-only HEAD^ HEAD | grep -q '^docs/'; then
echo "docs_changed=true" >> $GITHUB_ENV
else
echo "docs_changed=false" >> $GITHUB_ENV
fi
- name: Trigger Deployment
if: env.docs_changed == 'true'
run: |
response=$(curl -X POST -w "%{http_code}" -s -o /dev/null ${{ secrets.WEBSITE_DEPLOY_URL }})
if [ "$response" -eq 200 ]; then
Expand Down

0 comments on commit 1e831f3

Please sign in to comment.