build(web): force compatibility renderer + import pass; export and copy index.html
This commit is contained in:
@@ -1,7 +1,14 @@
|
|||||||
FROM barichello/godot-ci:4.2.2 AS build
|
FROM barichello/godot-ci:4.2.2 AS build
|
||||||
WORKDIR /project
|
WORKDIR /project
|
||||||
COPY . .
|
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
|
FROM nginx:1.27-alpine
|
||||||
COPY --from=build /project/build/web/ /usr/share/nginx/html/
|
COPY --from=build /project/build/web/ /usr/share/nginx/html/
|
||||||
|
|||||||
Reference in New Issue
Block a user