updated to use correct variables
This commit is contained in:
@@ -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 .
|
||||
|
||||
Reference in New Issue
Block a user