Making complex plans for July is pure guesswork given the fast-evolving covid situation.
Portugal is currently on UK green list, but that does not mean that it will still be there in July.
I think that Portugal still requires 14-day isolation if you arrive from South Africa.
And South Africa see an uptick in cases as mentioned above