diff --git a/.gitea/workflows/deploy-server.yaml b/.gitea/workflows/deploy-server.yaml index 3e430b1..5c79545 100644 --- a/.gitea/workflows/deploy-server.yaml +++ b/.gitea/workflows/deploy-server.yaml @@ -21,13 +21,32 @@ jobs: mkdir -p ${{ github.workspace }} git init --object-format=sha256 ${{ github.workspace }} - - name: Checkout Main Branch (No LFS) - uses: actions/checkout@v4 - with: - ref: main - lfs: false # <--- Turn this OFF - fetch-depth: 1 - clean: false + - name: Manual Checkout (SHA-256 Force) + env: + # This token is automatically provided by Gitea/GitHub Actions + TOKEN: ${{ secrets.GITHUB_TOKEN }} + + run: | + # 1. Clean workspace explicitly to be safe + rm -rf ./* ./.git + + # 2. Initialize specifically with SHA-256 + git init --object-format=sha256 + + # 3. Add remote with authentication embedded + # Use the environment variable to keep the log clean + git remote add origin "https://$TOKEN@git.dapa.hu/dapa/assetto.git" + + # 4. Fetch the specific branch (depth 1 for speed) + git fetch --depth=1 origin main + + # 5. Checkout the branch + git checkout main + + # 6. Initialize LFS and pull files + # Note: If this fails, it confirms the files are missing from the server (see below) + git lfs install + git lfs pull - name: Manual LFS Fetch with Debugging env: