Lonely are the Brave

John W. "Jack" Burns (Kirk Douglas) works as a roaming ranch hand much as the cowboys of the old West did, refusing to join modern society. He rejects much of modern technology, not even carrying any identification such as a driver's license or draft card. He can't provide an address because he just sleeps wherever he finds a place.
As Burns crosses a highway into a town in New Mexico, his horse Whiskey has a difficult time crossing the road, confused and scared by the traffic. They enter town to visit Jerry (Gena Rowlands). She is the wife of an old friend, Paul Bondi (Michael Kane), who has been jailed for giving aid to illegal immigrants. Jack explains his dislike for a society that restricts a man on where he can or can't go, what he can or can't do.
To break Bondi out of jail, Burns decides he himself needs to get arrested. After a violent barroom fight against a one-armed man (Bill Raisch) in which he is forced to use only one arm himself, Burns is arrested. When the police decide to let him go, he deliberately punches a cop to get himself re-arrested. He is now facing a probable sentence of a year in jail, which allows him to see Bondi, with a purpose of helping him escape. The town is a sleepy border town and the cops are mostly bored, occasionally dealing with minor offenses. The Sheriff, Morey Johnson (Walter Matthau), has to compel them to pay attention to their duties at times. During the course of the story, the seemingly unrelated progress of a tractor-trailer truck carrying toilets, driven by Carroll O'Connor, is inter-cut with the principal events.
Joining Bondi in jail, Burns tries to persuade him to escape. He tells Bondi he couldn't spend a year locked up because he'd probably kill someone. Burns defends Bondi from the attention of sadistic Deputy Sheriff Gutierrez (George Kennedy), who picks Burns as his next target. During the night the inmates saw through one of the jail's bars using two hacksaw blades Burns hid in his boot. The deputy summons Burns in the middle of the night and beats him. Upon returning to his cell, Burns tries to persuade Bondi to join him in escaping, but Bondi, nearing the end of his sentence, and having a family and too much at stake to become a fugitive from the law, decides to remain. Burns breaks out by himself and returns to Bondi's house, where he picks up his horse and some food from Bondi's wife. After the jail break, the Sheriff learns that Burns served in the military during the Korean War, including seven months in a disciplinary training center for striking a superior officer. He also received a Purple Heart and a Distinguished Service Cross with oak leaf clusters for his valor during battle.
Burns heads for the mountains on horseback with the goal of crossing the border into Mexico. The police mount an extensive search, with Sheriff Johnson and his Deputy Sheriff Harry (William Schallert) following him in a jeep. A military helicopter is brought in, and when the air crew locates Burns, they relay his location to the sheriff. Whiskey is repeatedly spooked by the helicopter and other modern noises. Burns shoots the tail rotor, damaging it and causing the pilot to lose control and crash land.
Deputy Gutierrez also chases Burns. He sees the horse and is preparing to shoot when Burns sneaks up, knocking him unconscious with the his rifle butt. Burns leads his horse up impossibly difficult, rocky slopes to escape his pursuers, but the lawmen keep on his trail, forcing him to keep moving. Surrounded on three sides, Burns' horse refuses at first to climb a steep slope. They finally surmount the crest of the Sandia Mountains and escape into the east side of the mountains, a broad stand of heavy timber, with the lawmen shooting at him. The Sheriff acknowledges that Burns has evaded their attempts to capture him. Burns is shot through the ankle during his dash to the timber.
Burns appears to have escaped the law and his trackers late at night when he tries to cross Highway 66 in Tijeras Canyon during a heavy rainstorm. His horse is spooked, confused by noise of the traffic and blinded by the lights. The truck driver hauling the load of toilets, his vision obscured by rain, strikes Burns and his horse as they are attempting to cross the road. The sheriff arrives and, asked by the state police if Burns is the man he has been looking for, says he can't identify him, because he's never seen the man he is looking for up close. The sheriff does not request that any effort be made to identify Burns. The viewer is allowed to think that maybe the sheriff actually believes the man to be Burns, but has chosen to not take him into custody. Whiskey, who is seriously wounded, is euthanized. The Sheriff and his deputy Harry head home; Burns is transported from the scene in an ambulance. It is left unclear whether he will survive his injuries. The film closes with a shot of Burns' cowboy hat swamped by rain in the middle of the highway.

Question: what did the deputy do to burns in the middle of the night
Answer: summons him and beats him