to make a promise never to drink alcohol
sign / take the pledge
Definitions from the Oxford Advanced Learner's Dictionary, 9th edition