Optimize CI workflow to avoid duplicate runs
Update GitHub Actions workflow triggers to prevent duplicate CI runs when creating pull requests. Now workflows only run on:
- Push events to master branch
- Pull request events (opened, synchronize, reopened)
This eliminates redundant CI runs when pushing to feature branches and creating PRs.