updated to use correct variables
Some checks failed
Deploy / lint (push) Successful in 5s
Deploy / test (push) Successful in 28s
Deploy / deploy (push) Failing after 4s

This commit is contained in:
2026-03-03 19:53:54 +01:00
parent ceb5c3f982
commit 12788a3946

View File

@@ -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):
# 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
# DEPLOY_KEY — SSH private key for deployment
# 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 .