Fix deploy pipeline checkout: no Node on host runner, repo is private
actions/checkout@v4 failed with "Cannot find: node in PATH" (the runner intentionally has no Node toolchain). Replaced with a plain git clone authenticated via a new DEPLOY_TOKEN Gitea Actions secret, since the repo needs auth even for a read-only clone. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,10 +17,20 @@ jobs:
|
||||
deploy:
|
||||
runs-on: [self-hosted, homelab]
|
||||
steps:
|
||||
# Plain git clone instead of actions/checkout@v4: that action is
|
||||
# Node.js-based, and this runner deliberately has no Node toolchain
|
||||
# (host-mode jobs run directly on the homelab, kept minimal). Auth is
|
||||
# via the DEPLOY_TOKEN Actions secret (repo is private); the token is
|
||||
# stripped from the stored remote URL right after cloning.
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
env:
|
||||
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
find . -mindepth 1 -delete
|
||||
git clone --depth 1 --branch "${{ inputs.ref }}" \
|
||||
"http://${DEPLOY_TOKEN}@172.24.0.2:3000/BPPP/smb-online.git" .
|
||||
git remote set-url origin http://172.24.0.2:3000/BPPP/smb-online.git
|
||||
|
||||
# Only db/ and app/ — never touch secrets/ or .env, which live only on
|
||||
# the host and aren't in the repo.
|
||||
|
||||
Reference in New Issue
Block a user