Answer by taking a quote from the following article:

Yoda is a fictional character in the Star Wars franchise created by George Lucas, first appearing in the 1980 film The Empire Strikes Back. In the original films, he trains Luke Skywalker to fight against the Galactic Empire. In the prequel films, he serves as the Grand Master of the Jedi Order and as a high-ranking general of Clone Troopers in the Clone Wars. Before his death in Return of the Jedi at the age of 900, Yoda was the oldest living character in the Star Wars franchise in canon, until the introduction of Maz Kanata in Star Wars: The Force Awakens.

In Revenge of the Sith, Yoda leads the Jedi Council in pursuing the mysterious Sith Lord Darth Sidious. Palpatine has by now amassed near-dictatorial emergency powers, and begins interfering in Jedi affairs by appointing Anakin as his personal representative on the Council. The Council grants Anakin a Council seat, but denies him the rank of Master, feeling that doing so would amount to giving Palpatine a vote in the Council. Additionally, they order him to spy on Palpatine, whom Anakin considers a friend and mentor. Confused and angered by the perceived snub and the instructions to commit what he believes to be treason, Anakin continues to lose faith in the Jedi Order. Anakin seeks Yoda's counsel about his prophetic visions that someone close to him will die. Yoda, unaware of the person Anakin speaks of is Padme, or that she is Anakin's wife and pregnant with his child, tells him to "train himself to let go of everything that he fears to lose". Unsatisfied, Anakin turns to Palpatine, who then reveals himself as Darth Sidious. Palpatine manipulates the young Jedi into becoming his Sith apprentice, Darth Vader, with the promise that the dark side holds the power to save Padme from dying in childbirth. Palpatine later transforms the Republic into the tyrannical Galactic Empire, proclaiming himself emperor for life, and orders the clone troopers to kill their Jedi generals. At this time, Yoda is on Kashyyyk, overseeing the battle between the Separatist forces and a combined command of clone troopers and Wookiees. Through the Force, Yoda feels the deaths of each of the Jedi as they are assassinated by their own troops. After swiftly killing the clone troopers instructed to kill him, he escapes with Wookiee leaders Tarfful and Chewbacca (Peter Mayhew), and returns to Coruscant, where he and Obi-Wan fight their way into the Jedi Temple to stop a trap for all surviving Jedi. Inside, they discover that all the Jedi inside, younglings included, have been slaughtered. They then discover a holographic recording, revealing Vader as the assassin. Yoda decides to face Palpatine, sending Obi-Wan to kill Vader. When Obi-Wan protests, Yoda tells him that the Anakin he knew no longer exists, having been "consumed by Darth Vader". Subsequently, Yoda battles Palpatine in a lightsaber duel that wrecks the Senate Rotunda. In the end, neither is able to overcome the other and Yoda is forced to retreat. He goes into exile on Dagobah so that he may hide from the Empire and wait for another opportunity to destroy the Sith. At the end of the film, it was revealed that Yoda has been in contact with Qui-Gon's spirit, learning the secret of immortality from him and passing it on to Obi-Wan. Yoda is also instrumental in deciding the fate of the Skywalker children after Padme dies in childbirth, recommending that Luke and Leia be hidden from Vader and Palpatine in remote locations. Other than the ancient Jedi Master, only the Organas, the Lars family, R2-D2 and Obi-Wan know of their true identities. CANNOTANSWER

Did anything happen to Yoda during the film

Yoda battles Palpatine in a lightsaber duel that wrecks the Senate Rotunda.