An option is not to post a deposit directly to a liability account when you receive it, but rather to record it with a Receive Payment. This leaves a credit on the customer's account in AR. The advantage of this is that you can easily see the remaining balance at any time.
When you purchase materials or pay sub-contractors, check the Billable column on the Bill, Check or Expense. That creates an Unbilled Expense, that you can convert to an Invoice. This will automatically be applied to the previous credit, if you left the default setting, showing the amount remaining at the bottom of the invoice.
A credit in AR shows as a negative asset on a balance sheet, which is not technically correct, so if you publish a balance sheet while any open credits are in place, create a Journal Entry on b/sheet date, to move the total open credits amount from AR to a current liability, and reverse it the next day.