fix: copy codebase to VPS using appleboy/scp-action to avoid git clone/pull auth dependency
This commit is contained in:
@@ -13,6 +13,16 @@ jobs:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Copy Files to VPS
|
||||
uses: appleboy/scp-action@v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.VPS_HOST }}
|
||||
username: ${{ secrets.VPS_USERNAME }}
|
||||
key: ${{ secrets.VPS_SSH_KEY }}
|
||||
source: "."
|
||||
target: "/opt/imphenbot"
|
||||
rm: false
|
||||
|
||||
- name: Deploy via SSH
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
env:
|
||||
@@ -25,9 +35,6 @@ jobs:
|
||||
script: |
|
||||
cd /opt/imphenbot || exit
|
||||
|
||||
# Pull latest changes
|
||||
git pull origin master
|
||||
|
||||
# Write environment variables from GitHub Secrets
|
||||
echo "$ENV_FILE" > .env
|
||||
|
||||
|
||||
Reference in New Issue
Block a user