build(web): force compatibility renderer + import pass; export and copy index.html

This commit is contained in:
dingo
2026-02-28 03:25:00 +00:00
parent 1252486c3c
commit 505c0b59fa
+8 -1
View File
@@ -1,7 +1,14 @@
FROM barichello/godot-ci:4.2.2 AS build
WORKDIR /project
COPY . .
RUN godot --headless --path /project --export-release "Web" build/web/index.html
# Web export in Godot 4 requires Compatibility renderer; project defaults may differ.
# Also force import pass before export in headless CI to avoid fs/import race errors.
RUN sed -i 's#renderer/rendering_method="mobile"#renderer/rendering_method="compatibility"#' project.godot \
&& mkdir -p build/web \
&& godot --headless --path /project --import --quit \
&& godot --headless --path /project --export-release "Web" build/web/Origin-Client.html \
&& cp build/web/Origin-Client.html build/web/index.html
FROM nginx:1.27-alpine
COPY --from=build /project/build/web/ /usr/share/nginx/html/