First assume $S = \Spec(R)$ is the spectrum of a discrete valuation ring $R$ with closed point $s \in S$. Then $X_s$ is an effective Cartier divisor in $X$ and $X_s$ is regular as a scheme smooth over a field. Moreover the generic fibre $X_\eta$ is the open subscheme $X \setminus X_s$. It follows from More on Algebra, Lemma \ref{more-algebra-lemma-galois-conclusion} and the assumption on $G$ that $Z$ is tamely ramified over $X$ in codimension $1$. Let $Z' \to X$ be as in Lemma \ref{lemma-extend-tame-covering-normal}. Observe that the action of $G$ on $Z$ extends to an action of $G$ on $Z'$. By Lemma \ref{lemma-tame-covering-split} we see that $Z' \to X$ is finite \'etale over an open neighbourhood of $\sigma(y)$. Since $X_s$ is irreducible, this implies $Z \to X_\eta$ is unramified over $X$ in codimension $1$. Then we get a finite \'etale morphism $Y \to X$ whose restriction to $X_\eta$ is $Z$ by Lemma \ref{lemma-purity-one-divisor}. Of course $Y \cong Z'$ (details omitted; hint: compute \'etale locally) and hence $Y$ is a Galois cover with group $G$. \medskip\noindent General case. Let $U \subset S$ be a maximal open subscheme such that there exists a finite \'etale Galois cover $Y \to X \times_S U$ with group $G$ whose restriction to $X_\eta$ is isomorphic to $Z$. Assume $U \not = S$ to get a contradiction. Let $s \in S \setminus U$ be a generic point of an irreducible component of $S \setminus U$. Then the inverse image $U_s$ of $U$ in $\Spec(\mathcal{O}_{S, s})$ is the punctured spectrum of $\mathcal{O}_{S, s}$. We claim $Y \times_S U_s \to X \times_S U_s$ is the restriction of a finite \'etale Galois cover $Y'_s \to X \times_S \Spec(\mathcal{O}_{S, s})$ with group $G$. \medskip\noindent Let us first prove the claim produces the desired contradiction. By Limits, Lemma \ref{limits-lemma-glueing-near-point} we find an open subscheme $U \subset U' \subset S$ containing $s$ and a morphism $Y'' \to U'$ of finite presentation whose restriction to $U$ recovers $Y' \to U$ and whose restriction to $\Spec(\mathcal{O}_{S, s})$ recovers $Y'_s$. Moreover, by the equivalence of categories given in the lemma, we may assume after shrinking $U'$ there is a morphism $Y'' \to U' \times_S X$ and there is an action of $G$ on $Y''$ over $U' \times_S X$ compatible with the given morphisms and actions after base change to $U$ and $\Spec(\mathcal{O}_{S, s})$. After shrinking $U'$ further if necessary, we may assume $Y'' \to U \times_S X$ is finite \'etale, see Limits, Lemma \ref{limits-lemma-glueing-near-point-properties}. This means we have found a strictly larger open of $S$ over which $Y$ extends to a finite \'etale Galois cover with group $G$ which gives the contradiction we were looking for. \medskip\noindent Proof of the claim. We may and do replace $S$ by $\Spec(\mathcal{O}_{S, s})$. Then $S = \Spec(A)$ where $(A, \mathfrak m)$ is a local normal domain. Also $U \subset S$ is the punctured spectrum and we have a finite \'etale Galois cover $Y \to X \times_S U$ with group $G$. If $\dim(A) = 1$, then we can construct the extension of $Y$ to a Galois covering of $X$ by the first paragraph of the proof. Thus we may assume $\dim(A) \geq 2$ and hence $\text{depth}(A) \geq 2$ as $S$ is normal, see Algebra, Lemma \ref{algebra-lemma-criterion-normal}. Since $X \to S$ is flat, we conclude that $\text{depth}(\mathcal{O}_{X, x}) \geq 2$ for every point $x \in X$ mapping to $s$, see Algebra, Lemma \ref{algebra-lemma-apply-grothendieck}. Let $$ Y' \longrightarrow X $$ be the finite morphism constructed in Lemma \ref{lemma-extend-S2} using $Y \to X \times_S U$. Observe that we obtain a canonical $G$-action on $Y$. Thus all that remains is to show that $Y'$ is \'etale over $X$. In fact, by Lemma \ref{lemma-purity-smooth-over-depth2} (for example) it even suffices to show that $Y' \to X$ is \'etale over the (unique) generic point of the fibre $X_s$. This we do by a local calculation in a (formal) neighbourhood of $\sigma(s)$. \medskip\noindent Choose an affine open $\Spec(B) \subset X$ containing $\sigma(s)$. Then $A \to B$ is a smooth ring map which has a section $\sigma : B \to A$. Denote $I = \Ker(\sigma)$ and denote $B^\wedge$ the $I$-adic completion of $B$. Then $B^\wedge \cong A[[x_1, \ldots, x_d]]$ for some $d \geq 0$, see Algebra, Lemma \ref{algebra-lemma-section-smooth}. Of course $B \to B^\wedge$ is flat (Algebra, Lemma \ref{algebra-lemma-completion-flat}) and the image of $\Spec(B^\wedge) \to X$ contains the generic point of $X_s$. Let $V \subset \Spec(B^\wedge)$ be the inverse image of $U$. Consider the finite \'etale morphism $$ W = Y \times_{(X \times_S U)} V \longrightarrow V $$ By the compatibility of the construction of $Y'$ with flat base change in Lemma \ref{lemma-extend-S2} we find that the base chang $Y' \times_X \Spec(B^\wedge) \to \Spec(B^\wedge)$ is constructed from $W \to V$ over $\Spec(B^\wedge)$ by the procedure in Lemma \ref{lemma-extend-S2}. Set $V_0 = V \cap V(x_1, \ldots, x_d) \subset V$ and $W_0 = W \times_V V_0$. This is a normal integral scheme which maps into $\sigma(S)$ by the morphism $\Spec(B^\wedge) \to X$ and in fact is identified with $\sigma(U)$. Hence we know that $W_0 \to V_0 = U$ completely decomposes as this is true for its generic fibre by our assumption on $Z \to X_\eta$ having a $\kappa(\eta)$-rational point lying over $\sigma(\eta)$ (and of course the $G$-action then implies the whole fibre $Z_{\sigma(\eta)}$ is a disjoint union of copies of the scheme $\eta = \Spec(\kappa(\eta))$). Finally, by Lemma \ref{lemma-fully-faithful-power-series-over-depth2} we have $$ W_0 \times_U V \cong W $$ This shows that $W$ is a disjoint union of copies of $V$ and hence $Y' \times_X \Spec(B^\wedge)$ is a disjoint union of copies of $\Spec(B^\wedge)$ and the proof is complete.