I'm not a doctor, however after googling, most websites suggest you to stop breastfeeding temporarily while taking this painkiller as it is very strong.
You can pump and dump your breastmilk temporarily and restart again once you stop the painkillers.