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 # Gitea Actions CI/CD pipeline: lint → test → deploy
# Triggers on push to main branch. # Triggers on push to main branch.
# # Required variables and secrets (set in Gitea repo settings):
# Required secrets (set in Gitea repo settings): # Variables:
# DEPLOY_HOST — server IP or hostname # DEPLOY_HOST — server IP or hostname
# DEPLOY_USER — SSH username on the server # DEPLOY_PATH — absolute path to the directory on the server
# DEPLOY_KEY — SSH private key for deployment # 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 name: Deploy
on: on:
@@ -78,11 +81,13 @@ jobs:
- name: Deploy via SSH - name: Deploy via SSH
uses: appleboy/ssh-action@v1 uses: appleboy/ssh-action@v1
with: with:
host: ${{ secrets.DEPLOY_HOST }} host: ${{ vars.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }} port: ${{ vars.SSH_PORT }}
key: ${{ secrets.DEPLOY_KEY }} username: ${{ vars.DEPLOY_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ vars.SSH_KNOWN_HOSTS }}
script: | script: |
cd /opt/stock-data-backend cd ${{ vars.DEPLOY_PATH }}
git pull origin main git pull origin main
source .venv/bin/activate source .venv/bin/activate
pip install -e . pip install -e .