From 12788a39461b30e73a06d53bf07f771cba989e23 Mon Sep 17 00:00:00 2001 From: Dennis Thiessen Date: Tue, 3 Mar 2026 19:53:54 +0100 Subject: [PATCH] updated to use correct variables --- .gitea/workflows/deploy.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index a25a99c..c33e3ab 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -1,11 +1,14 @@ # Gitea Actions CI/CD pipeline: lint → test → deploy # Triggers on push to main branch. -# -# Required secrets (set in Gitea repo settings): -# DEPLOY_HOST — server IP or hostname -# DEPLOY_USER — SSH username on the server -# DEPLOY_KEY — SSH private key for deployment - +# Required variables and secrets (set in Gitea repo settings): +# Variables: +# DEPLOY_HOST — server IP or hostname +# DEPLOY_PATH — absolute path to the directory on the server +# DEPLOY_USER — SSH username on the server +# SSH_KNOWN_HOSTS — SSH known_host fingerprint for security +# SSH_PORT — SSH port of the server +# Secrets: +# SSH_PRIVATE_KEY — SSH private key for deployment name: Deploy on: @@ -78,11 +81,13 @@ jobs: - name: Deploy via SSH uses: appleboy/ssh-action@v1 with: - host: ${{ secrets.DEPLOY_HOST }} - username: ${{ secrets.DEPLOY_USER }} - key: ${{ secrets.DEPLOY_KEY }} + host: ${{ vars.DEPLOY_HOST }} + port: ${{ vars.SSH_PORT }} + username: ${{ vars.DEPLOY_USER }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + known_hosts: ${{ vars.SSH_KNOWN_HOSTS }} script: | - cd /opt/stock-data-backend + cd ${{ vars.DEPLOY_PATH }} git pull origin main source .venv/bin/activate pip install -e .