Files
assetto/.gitea/workflows/deploy-server.yaml
danipatko 426b83518a
All checks were successful
Extract Archives / prepare-server-content (push) Successful in 3m50s
change workflow volume path
2026-02-08 16:55:48 +01:00

70 lines
2.3 KiB
YAML

name: Extract Archives
run-name: Extract Archives
on:
workflow_dispatch:
push:
branches:
- master
# paths:
# - "cars/**" # Only run if archives in cars/ change
jobs:
prepare-server-content:
runs-on: ubuntu-latest
container:
volumes:
- /root/assetto-corsa/assetto/content:/content
env:
GIT_DEFAULT_HASH: sha1
steps:
- name: Pre-initialize Repository with SHA-1
run: |
mkdir -p ${{ github.workspace }}
git init --object-format=sha1 ${{ github.workspace }}
- name: Checkout Master Branch (LFS)
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-1
git init --object-format=sha1
# 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 master
# 5. Checkout the branch
git checkout master
# 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: Install 7-Zip
run: |
sudo apt-get clean
sudo apt-get update
sudo apt-get install -y p7zip-full tree
- name: Process Archives
run: |
chmod +x process.sh
./process.sh
# - name: Verify Installation
# run: |
# echo "📁Final Server Directory Structure:"
# # Show directory tree 3 levels deep to verify structure without spamming files
# find ./server-data -maxdepth 3 -not -path '*/.*'