It depends on what the halal act is. If it’s a makrouh halal act (like overeating) then yes your vow would be valid. But if it’s a halal act that’s recommended generally it won’t be a valid vow. Now if it’s a neutral act and it keeps you away from haram, then keep your promise because it’s serving a good purpose.