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