Merge pull request 'Use secrets for VPS deploy settings' (#20) from codex/issue-12-repair into main

Reviewed-on: Ingwaz/openbrain-mcp#20
This commit is contained in:
2026-03-22 12:56:28 +00:00

View File

@@ -10,8 +10,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
VPS_HOST: ${{ vars.VPS_HOST }} VPS_HOST: ${{ secrets.VPS_HOST }}
VPS_USER: ${{ vars.VPS_USER }} VPS_USER: ${{ secrets.VPS_USER }}
DEPLOY_DIR: /opt/openbrain-mcp DEPLOY_DIR: /opt/openbrain-mcp
SERVICE_NAME: openbrain-mcp SERVICE_NAME: openbrain-mcp
steps: steps:
@@ -65,7 +65,7 @@ jobs:
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
run: | run: |
set -euxo pipefail set -euxo pipefail
: "${VPS_HOST:?Set repository variable VPS_HOST}" : "${VPS_HOST:?Set repository secret VPS_HOST}"
: "${VPS_USER:=root}" : "${VPS_USER:=root}"
install -d -m 700 "$HOME/.ssh" install -d -m 700 "$HOME/.ssh"
printf '%s\n' "${{ secrets.VPS_SSH_KEY }}" > "$HOME/.ssh/deploy_key" printf '%s\n' "${{ secrets.VPS_SSH_KEY }}" > "$HOME/.ssh/deploy_key"
@@ -76,7 +76,7 @@ jobs:
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
run: | run: |
set -euxo pipefail set -euxo pipefail
: "${VPS_HOST:?Set repository variable VPS_HOST}" : "${VPS_HOST:?Set repository secret VPS_HOST}"
: "${VPS_USER:=root}" : "${VPS_USER:=root}"
SSH="ssh -i $HOME/.ssh/deploy_key -o IdentitiesOnly=yes" SSH="ssh -i $HOME/.ssh/deploy_key -o IdentitiesOnly=yes"
SCP="scp -i $HOME/.ssh/deploy_key -o IdentitiesOnly=yes" SCP="scp -i $HOME/.ssh/deploy_key -o IdentitiesOnly=yes"
@@ -94,7 +94,7 @@ jobs:
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
run: | run: |
set -euxo pipefail set -euxo pipefail
: "${VPS_HOST:?Set repository variable VPS_HOST}" : "${VPS_HOST:?Set repository secret VPS_HOST}"
: "${VPS_USER:=root}" : "${VPS_USER:=root}"
SSH="ssh -i $HOME/.ssh/deploy_key -o IdentitiesOnly=yes" SSH="ssh -i $HOME/.ssh/deploy_key -o IdentitiesOnly=yes"
@@ -173,7 +173,7 @@ jobs:
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
run: | run: |
set -euxo pipefail set -euxo pipefail
: "${VPS_HOST:?Set repository variable VPS_HOST}" : "${VPS_HOST:?Set repository secret VPS_HOST}"
: "${VPS_USER:=root}" : "${VPS_USER:=root}"
SSH="ssh -i $HOME/.ssh/deploy_key -o IdentitiesOnly=yes" SSH="ssh -i $HOME/.ssh/deploy_key -o IdentitiesOnly=yes"