From 9b40829e56069ff09e6f296a078751c5961684a3 Mon Sep 17 00:00:00 2001 From: Gianpierre Mio <88248836+DarkCodex29@users.noreply.github.com> Date: Tue, 10 Mar 2026 08:37:26 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20replace=20actions/checkout=20with=20nati?= =?UTF-8?q?ve=20git=20=E2=80=94=20runner=20has=20no=20node?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The self-hosted runner (gitea-act-runner-custom) lost node after image rebuild. Replace actions/checkout@v4 with plain git clone/reset. Also adds a guard to auto-rebuild the runner image if node is missing. --- .github/workflows/deploy.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 72a35f7..4c83fb7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,8 +8,21 @@ jobs: deploy: runs-on: self-hosted steps: + - name: Rebuild runner image if needed + run: | + if ! docker run --rm gitea-act-runner-custom:latest node --version > /dev/null 2>&1; then + docker build -t gitea-act-runner-custom:latest -f /home/deployer/gitea-runner.Dockerfile /home/deployer/ + fi + - name: Checkout - uses: actions/checkout@v4 + run: | + if [ ! -d /workspace/darkcodex/api-ubigeo/.git ]; then + git clone https://948ee86882f8d9ca46eb94750addfccdace443a6@git.darkcodex.dev/darkcodex/api-ubigeo.git \ + /workspace/darkcodex/api-ubigeo + fi + cd /workspace/darkcodex/api-ubigeo + git fetch origin main + git reset --hard origin/main - name: Sync source run: | @@ -18,7 +31,7 @@ jobs: --exclude='node_modules' \ --exclude='dist' \ --exclude='.env' \ - . /home/deployer/api-ubigeo/ + /workspace/darkcodex/api-ubigeo/ /home/deployer/api-ubigeo/ - name: Build & deploy run: bash /home/deployer/deploy-ubigeo.sh