I have a $n$-sided regular pyramid based on a regular polygon, the length of the side of regular polygon, $s$. Also I know the dihedral angle between the face and the base, $\alpha$.
Question. How to calculate the height of the pyramid, $h$?
My attemp is:
I have found the Thales' method. Thales measured the height of the pyramids by their shadows at the moment when his own shadow was equal to his height.
Let's say $n=4$, $s=1$ unit and $\alpha=60$ then I can find the $R=\frac{s}{2 \cdot sin \frac{180}{n}}$ and $r=R \cdot cos\frac{180}{n}$.

First calculate the inradius of the polygonal base, i.e. from the centre to the middle of en edge.
$$r = \frac{s}{2\tan(180/n)}$$
This is equivalent to what you already did.
Then you have a vertical right triangle of unknown height $h$, known base $r$, and known angle $\alpha$.
$$\tan(\alpha) = \frac{h}{r}\\ \implies h = r\tan(\alpha)$$