By RAW, when I use a grapple:
When you want to grab a creature or wrestle with it, you can use the Attack action…"
And the 5th level eldrich invocation:
Prerequisite: 5th level, Pact o f the Blade feature
You can attack with your pact weapon twice, instead of once, whenever you take the Attack action on your turn."
So, by RAW, can the warlock, with those requisites, use his action to grapple and then attack twice with his pact weapon?