The amount of the bonus varies depending upon whether you sign up for month-to-month or longer. You can only get the full $97.00 if you sign up for at least one year. Yes, you can sign up for a single year, get the full bonus and “just quit” at the end of the year.
It pays to note, however, that you can only get a bonus one time, as a “new Dreamhost Customer”; canceling and signing up again will not get you another bonus. You should also note that Dreamhost has “sales” going on that will let you lock in a further discount at the same discounted price for as long as you maintain that account (currently $19.95 a month for Level Three - Code Monster). If you cancel, you will have to pay the “going rate” at the time. Might be lower, might be higher…
Make sure you check out the Terms and Conditions of the Bonus, the 97 day “Money Back Guarantee”, etc. (use a charge card vs. Pay Pal. etc.)