From ba379bafdfaa30f2773db98fd29b0e7cae82a53a Mon Sep 17 00:00:00 2001
From: aMytho <58316242+aMytho@users.noreply.github.com>
Date: Sun, 24 Mar 2024 20:51:37 -0500
Subject: [PATCH] Add web support on deploy
---
.github/workflows/deploy.yml | 44 ++++++
build/web/index.html | 269 +++++++++++++++++++++++++++++++++++
export_presets.cfg | 67 ++++++++-
3 files changed, 373 insertions(+), 7 deletions(-)
create mode 100644 .github/workflows/deploy.yml
create mode 100644 build/web/index.html
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 0000000..e12143a
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,44 @@
+name: "godot-ci export"
+on:
+ push:
+ branches:
+ - 'main'
+
+env:
+ GODOT_VERSION: 4.2.1
+ EXPORT_NAME: Brave-Frontier-Godot
+ PROJECT_PATH: Brave-Frontier-Godot
+
+jobs:
+ export-web:
+ name: Web Export
+ runs-on: ubuntu-20.04
+ container:
+ image: barichello/godot-ci:4.2.1
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ lfs: true
+ - name: Setup
+ run: |
+ mkdir -v -p ~/.local/share/godot/export_templates/
+ mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
+ - name: Web Build
+ run: |
+ mkdir -v -p build/web
+ cd $PROJECT_PATH
+ godot --headless --verbose --export-release "HTML5" ../build/web/index.html
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v1
+ with:
+ name: web
+ path: build/web
+ - name: Install rsync 📚
+ run: |
+ apt-get update && apt-get install -y rsync
+ - name: Deploy to GitHub Pages 🚀
+ uses: JamesIves/github-pages-deploy-action@releases/v4
+ with:
+ branch: gh-pages # The branch the action should deploy to.
+ folder: build/web # The folder the action should deploy.
diff --git a/build/web/index.html b/build/web/index.html
new file mode 100644
index 0000000..cc4b4a5
--- /dev/null
+++ b/build/web/index.html
@@ -0,0 +1,269 @@
+
+
+
+
+
+ $GODOT_PROJECT_NAME
+
+ $GODOT_HEAD_INCLUDE
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/export_presets.cfg b/export_presets.cfg
index 25dfc15..981c3a5 100644
--- a/export_presets.cfg
+++ b/export_presets.cfg
@@ -3,6 +3,7 @@
name="Windows Desktop"
platform="Windows Desktop"
runnable=true
+dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
@@ -12,25 +13,19 @@ encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
-script_export_mode=1
-script_encryption_key=""
[preset.0.options]
custom_template/debug=""
custom_template/release=""
-debug/export_console_script=1
+debug/export_console_wrapper=1
binary_format/embed_pck=false
texture_format/bptc=false
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
-texture_format/no_bptc_fallbacks=true
binary_format/architecture="x86_64"
codesign/enable=false
-codesign/identity_type=0
-codesign/identity=""
-codesign/password=""
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
@@ -47,3 +42,61 @@ application/product_name=""
application/file_description=""
application/copyright=""
application/trademarks=""
+application/export_angle=0
+ssh_remote_deploy/enabled=false
+ssh_remote_deploy/host="user@host_ip"
+ssh_remote_deploy/port="22"
+ssh_remote_deploy/extra_args_ssh=""
+ssh_remote_deploy/extra_args_scp=""
+ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
+$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
+$trigger = New-ScheduledTaskTrigger -Once -At 00:00
+$settings = New-ScheduledTaskSettingsSet
+$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
+Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
+Start-ScheduledTask -TaskName godot_remote_debug
+while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
+Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
+ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
+Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
+Remove-Item -Recurse -Force '{temp_dir}'"
+debug/export_console_script=1
+texture_format/no_bptc_fallbacks=true
+
+[preset.1]
+
+name="Web"
+platform="Web"
+runnable=true
+dedicated_server=false
+custom_features=""
+export_filter="all_resources"
+include_filter="*.json,*.sql"
+exclude_filter=""
+export_path="../../Brave Frontier Exports/brave-frontier-godot.html"
+encryption_include_filters=""
+encryption_exclude_filters=""
+encrypt_pck=false
+encrypt_directory=false
+
+[preset.1.options]
+
+custom_template/debug=""
+custom_template/release=""
+variant/extensions_support=true
+vram_texture_compression/for_desktop=true
+vram_texture_compression/for_mobile=false
+html/export_icon=true
+html/custom_html_shell=""
+html/head_include=""
+html/canvas_resize_policy=2
+html/focus_canvas_on_start=true
+html/experimental_virtual_keyboard=false
+progressive_web_app/enabled=false
+progressive_web_app/offline_page=""
+progressive_web_app/display=1
+progressive_web_app/orientation=2
+progressive_web_app/icon_144x144="res://Units/Res/9/unit_ills_battle_30011.png"
+progressive_web_app/icon_180x180="res://Units/Res/5/unit_ills_battle_20011.png"
+progressive_web_app/icon_512x512="res://Units/Res/1/unit_ills_battle_10011.png"
+progressive_web_app/background_color=Color(0, 0, 0, 1)