diff --git a/.woodpecker.yml b/.woodpecker.yml index fdc0dd1..eab0270 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -9,16 +9,16 @@ steps: - export PATH="$HOME/.fly/bin:$PATH" - flyctl deploy --config fly.toml --app gallus-pub --remote-only - #build_and_deploy_backend: - # image: node:20 - # environment: - # FLY_API_TOKEN: - # from_secret: FLY_API_TOKEN - # commands: - # - cd backend - # - curl -L https://fly.io/install.sh | sh - # - export PATH="$HOME/.fly/bin:$PATH" - # - flyctl deploy --config fly.toml --app gallus-cms-backend --remote-only + build_and_deploy_backend: + image: node:20 + environment: + FLY_API_TOKEN: + from_secret: FLY_API_TOKEN + commands: + - cd backend + - curl -L https://fly.io/install.sh | sh + - export PATH="$HOME/.fly/bin:$PATH" + - flyctl deploy --config fly.toml --app gallus-cms-backend --remote-only when: branch: diff --git a/backend/src/services/git.service.ts b/backend/src/services/git.service.ts index eb82dac..b78f36c 100644 --- a/backend/src/services/git.service.ts +++ b/backend/src/services/git.service.ts @@ -13,9 +13,7 @@ export class GitService { this.workspaceDir = env.GIT_WORKSPACE_DIR; this.repoUrl = env.GIT_REPO_URL; this.token = env.GIT_TOKEN; - // Ensure the git binary is explicitly set in production containers - const gitBinary = process.env.GIT_BINARY || (env.NODE_ENV === 'production' ? '/usr/bin/git' : 'git'); - this.git = simpleGit({ binary: gitBinary }); + this.git = simpleGit(); } async initialize() { @@ -29,14 +27,6 @@ export class GitService { ); try { - // Log git version to aid diagnosing ENOENT issues in runtime - try { - const version = await this.git.raw(['--version']); - console.log(`git available: ${version.trim()}`); - } catch (e: any) { - console.warn('git not available or failed to execute --version:', e?.message || e); - } - // Check if repo already exists await this.git.cwd(this.workspaceDir); await this.git.status();