Commit 1c626b1339
Unsigned
Layout: unified · split
.gitlab-ci.yml +6 −11
| @@ -15,20 +15,15 @@ build-job: | |||
| 15 | 15 | ||
| 16 | deploy-job: | 16 | deploy-job: |
| 17 | stage: deploy | 17 | stage: deploy |
| 18 | environment: production | 18 | script: |
| 19 | before_script: | 19 | - mkdir -p $HOME/.ssh |
| 20 | - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )' | 20 | - chmod 700 $HOME/.ssh |
| 21 | - eval $(ssh-agent -s) | 21 | - ssh-keyscan -p 2169 $SERVER_IP >> $HOME/.ssh/known_hosts |
| 22 | - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - | ||
| 23 | - mkdir -p ~/.ssh | ||
| 24 | - chmod 700 ~/.ssh | ||
| 25 | - ssh-keyscan $SERVER_IP >> ~/.ssh/known_hosts | ||
| 26 | - chmod 644 ~/.ssh/known_hosts | ||
| 27 | - | | 22 | - | |
| 28 | echo "Host homelab-remote | 23 | echo "Host homelab-remote |
| 29 | HostName $SERVER_IP | 24 | HostName $SERVER_IP |
| 30 | User $SERVER_USER | 25 | User $SERVER_USER |
| 31 | Port 2169" > ~/.ssh/config | 26 | Port 2169" > $HOME/.ssh/config |
| 32 | script: | 27 | - chmod 600 $HOME/.ssh/config |
| 33 | - echo "Deploying via Python script..." | 28 | - echo "Deploying via Python script..." |
| 34 | - ENV=prod uv run build.py <<< "r" | 29 | - ENV=prod uv run build.py <<< "r" |
Dockerfile +1
| @@ -10,6 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |||
| 10 | procps \ | 10 | procps \ |
| 11 | build-essential \ | 11 | build-essential \ |
| 12 | ca-certificates \ | 12 | ca-certificates \ |
| 13 | openssh-client \ | ||
| 13 | && rm -rf /var/lib/apt/lists/* | 14 | && rm -rf /var/lib/apt/lists/* |
| 14 | 15 | ||
| 15 | RUN useradd -m -s /bin/bash linuxbrew && \ | 16 | RUN useradd -m -s /bin/bash linuxbrew && \ |