Thank you for the query.
It is hard to say if he was in pain or not. With brain metastases and bile ducts obstruction most of the patients sooner or later are not quite conscious so it is very hard to determine the level of suffering. It may seem that this were some kind of natural sedation what lets you to believe that he were not in pain as he was unconscious. And you should keep it that way.
Bile duct cancer
is very aggressive and usually fatal disease. Especially with brain metastases. So for sure in this stage there were nothing that could be done. Sorry.