rm -f gwion-coverage-report/*.html
- name: Generate Report
+ if: github.event_name == 'push'
run: |
printf '# Gwion coverage\n```\n' > gwion-coverage-report/README.md
gcovr -s --filter '.*\.c$' src >> gwion-coverage-report/README.md
done
- name: Push Report
+ if: github.event_name == 'push'
run: |
cd gwion-coverage-report
git config --local user.email "action@github.com"
git commit -m "Update html report"
git push origin :gh-pages || true
git subtree push --prefix html origin gh-pages
- echo $GITHUB_EVENT_NAME
+ echo $GITHUB_EVENT_NAME $GITHUB_REF