From 6ac30dcc1b9c2648edfd7fecd7370a2a87252e8d Mon Sep 17 00:00:00 2001 From: Refringe Date: Fri, 3 Jan 2025 12:12:16 -0500 Subject: [PATCH] Manually clone and pull server files --- .github/workflows/build.yaml | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9c2bf4a..b339a1c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -181,17 +181,30 @@ jobs: } Write-Host "Cloning target: ${{ env.TARGET }}" - - uses: actions/checkout@v4 - with: - ref: ${{ env.TARGET }} - fetch-tags: true - lfs: false - path: 'SPT/Build/server' - - - name: Pull LFS - run: git lfs pull + - name: Clone Server shell: pwsh - working-directory: ./SPT/Build/server + run: | + # If found, remove any existing folder from a previous run + $serverPath = "$env:GITHUB_WORKSPACE\SPT\Build\server" + if (Test-Path $serverPath) { + Remove-Item -Recurse -Force $serverPath + } + + # Clone the server repo + git clone --depth=1 https://github.com/sp-tarkov/server.git $serverPath + + # Move into the cloned repo + Set-Location $serverPath + + # Fetch tags if needed + git fetch --tags + + # Checkout the ref (branch or tag) from $env.TARGET + git checkout $env:TARGET + + # Install LFS and pull files + git lfs install --local + git lfs pull - name: Output Commit Hash id: commit-hash