Can a 5th level Pact of the blade warlock, use his action to grapple, then attack twice with his pact weapon?

By RAW, when I use a grapple:

"Grappling

When you want to grab a creature or wrestle with it, you can use the Attack action…"

And the 5th level eldrich invocation:

"Thirsting Blade

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?