Improve the way to find doc end date.
Run CI only on master branch.