Skip to content

Commit c1a6368

Browse files
committed
Refactor deploy workflow to improve clarity and error handling in cloning and building processes
1 parent 1b702bc commit c1a6368

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ jobs:
2222
env:
2323
GH_TOKEN: ${{ secrets.GH_PAT }}
2424
run: |
25-
# Clone RealityMod
2625
git clone --recurse-submodules https://oauth2:$env:GH_TOKEN@github.com/BF3RM/RealityMod.git
27-
28-
# Clone Other Mods
2926
git clone https://oauth2:$env:GH_TOKEN@github.com/BF3RM/BlueprintManager.git
3027
git clone https://oauth2:$env:GH_TOKEN@github.com/BF3RM/VEManager.git
3128
@@ -44,28 +41,29 @@ jobs:
4441
- name: Install & Inject Vextpack & Build
4542
working-directory: Build/Admin/Mods/RealityMod/WebUI
4643
run: |
47-
# 1. Install Dependencies
4844
pnpm install
4945
50-
# 2. Inject vextpack into node_modules
51-
# We assume 'vextpack' folder is in the root of your git repo (github.workspace)
5246
$Source = "${{ github.workspace }}\vextpack"
5347
$Dest = "node_modules\vextpack"
5448
5549
if (Test-Path $Source) {
56-
Write-Host "Copying vextpack from $Source to $Dest"
50+
Write-Host "Injecting vextpack from $Source to $Dest"
5751
Copy-Item -Path $Source -Destination $Dest -Recurse -Force
5852
} else {
5953
Write-Warning "vextpack folder not found at root! Skipping injection."
6054
}
6155
62-
# 3. Build
6356
pnpm build
6457
65-
# Validation
66-
if (-not (Test-Path "ui.vuic")) { Write-Error "ui.vuic was not created!" }
58+
if (Test-Path "..\ui.vuic") {
59+
Write-Host "SUCCESS: ui.vuic found in RealityMod root."
60+
} else {
61+
Write-Error "FAILURE: ui.vuic was not found in ../ui.vuic!"
62+
# Debugging: List files in parent dir to see what happened
63+
Get-ChildItem -Path ".." | Select-Object Name
64+
exit 1
65+
}
6766
68-
# --- 5. RM LEVEL LOADER GEN ---
6967
- name: Run RMLevelLoaderGen
7068
working-directory: ${{ github.workspace }}
7169
env:
@@ -75,14 +73,12 @@ jobs:
7573
cd temp_loader
7674
.\generate.bat
7775
78-
# Move generated folder to Build directory
7976
if (Test-Path "mods\rm-levelloader") {
8077
Move-Item -Path "mods\rm-levelloader" -Destination "..\Build\Admin\Mods\rm-levelloader"
8178
} else {
8279
Write-Error "Could not find generated rm-levelloader folder."
8380
}
8481
85-
# --- 6. CONFIGURATION FILES ---
8682
- name: Generate Config Files
8783
working-directory: Build/Admin
8884
env:
@@ -151,7 +147,6 @@ jobs:
151147
"@
152148
Set-Content -Path "Startup.txt" -Value $startupContent
153149
154-
# --- 7. FINALIZE ---
155150
- name: Upload Server Artifact
156151
uses: actions/upload-artifact@v4
157152
with:

0 commit comments

Comments
 (0)