ST. PETERSBURG, Fla. — Gawker publisher Nick Denton wouldn’t hesitate to post a Miley Cyrus sex tape online — but isn’t so sure what he’d do with a video showing President Obama in the sack with first lady Michelle Obama.

During a 2013 deposition tied to Hulk Hogan’s $100 million invasion-of-privacy lawsuit against his media company, Denton said there was no question he would publish hypothetical explicit footage of the “Wrecking Ball” singer.

At the time, Cyrus was riding a wave of controversy over her provocative performance at the 2013 MTV Video Music Awards, where she twerked up a storm and rubbed herself with a giant foam finger.

“Her performance at the VMAs was pretty sexual, and, as a result of that, I would assume, this would be my best guess, that there’s no kind of current story, but I would guess there would be more interest in her sex life,” Denton, 49, testified.

When it came to the Obamas, however, Denton struggled to say if a sex video would be “newsworthy” enough for it to be posted on Gawker Media, his flagship news and gossip site — as he claims the Hulk Hogan tape was.

“I, I, I confess I would have problems with that one, because I know that there would be a lot of public interest, but I wouldn’t, I wouldn’t like the story, not for any reasons of political affiliation, but just because there’s no, there’s no hypocrisy,” Denton stammered.

Denton went on to explain that the bar would be higher for the Obamas because they “seem like a loving couple and if the tape does nothing but establish the fact that they are a loving couple, I don’t see that it would have any real value in changing perceptions or establishing any truth.”

An Obama sex video would have“voyeuristic interest, but not much news interest,” he said.

But Denton ultimately remained undecided on whether he’d post a video that could be called “Behind the White (House) Door.”

“I would be torn. I’d hope I do the right thing,” he said, without specifying exactly what that meant.

Denton is expected to take the witness stand when Hogan’s legal battle with Gawker enters its second week in a St. Petersburg courtroom on Monday. The 2013 deposition could come into play when Hogan’s lawyers cross-examine him.

At another point in the deposition, Hogan lawyer Douglas Mirell asked Denton if he would post a video of ex-President Bill Clinton and wife, Hillary, who is now the front-runner for the Democratic presidential nomination.

Denton — who likened the questions to a “fun puzzle” — claimed there was little reason to answer that one.

“I don’t believe they have sex, so that question­ ­. . .,” Denton said, as Hogan lawyer Mirell insisted it was “purely hypothetical.”

“But now you are getting into realms of absurdity,” Denton joked.