prv key
All checks were successful
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (push) Successful in 10s
checks / Set up Java for Backend Tests and Build (push) Successful in 13s
Gitea Actions Demo / Explore-Gitea-Actions-2 (pull_request) Successful in 3s
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (pull_request) Successful in 11s
checks / Set up Java for Backend Tests and Build (pull_request) Successful in 11s
All checks were successful
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (push) Successful in 10s
checks / Set up Java for Backend Tests and Build (push) Successful in 13s
Gitea Actions Demo / Explore-Gitea-Actions-2 (pull_request) Successful in 3s
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (pull_request) Successful in 11s
checks / Set up Java for Backend Tests and Build (pull_request) Successful in 11s
This commit is contained in:
@ -98,19 +98,22 @@ jobs:
|
||||
ssh -V
|
||||
scp -V || echo "SCP version info not available but command exists."
|
||||
|
||||
- name: Publish frontend .next build to server
|
||||
- name: Publish frontend .next build to Plesk server
|
||||
env:
|
||||
#SSH_PUBLIC_KEY: ${{ secrets.SSH_PUBLIC_KEY }}
|
||||
SSH_PUBLIC_KEY: ${{ vars.SSH_PUBLIC_KEY }}
|
||||
SSH_PRIVATE_KEY: ${{ vars.SSH_PRIVATE_KEY }}
|
||||
SERVER_IP: ${{ vars.SERVER_IP }}
|
||||
DOMAIN_NAME: ${{ vars.DOMAIN_NAME }}
|
||||
DOMAIN_NAME: ${{ vars.DOMAIN_NAME }} # optional, helps locate vhost
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "$SSH_PUBLIC_KEY" > ~/.ssh/id_rsa
|
||||
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
|
||||
echo "SERVER_IP: $SERVER_IP"
|
||||
echo "DOMAIN_NAME: $DOMAIN_NAME"
|
||||
|
||||
echo "Deploying to server: $SERVER_IP"
|
||||
echo "Deploying to domain: $DOMAIN_NAME"
|
||||
echo "Deploying with private key: $SSH_PRIVATE_KEY"
|
||||
|
||||
#Define Plesk web root (update DOMAIN_NAME in Gitea variables)
|
||||
WEB_ROOT="/var/www/vhosts/${DOMAIN_NAME}/httpdocs"
|
||||
|
||||
cat ~/.ssh/id_rsa | head -3
|
||||
|
||||
@ -124,25 +127,6 @@ jobs:
|
||||
|
||||
echo "SSH key ready for use:"
|
||||
ssh-keygen -lf ~/.ssh/id_rsa
|
||||
|
||||
ssh -o StrictHostKeyChecking=no root@$SERVER_IP "mkdir -p /var/www/frontend"
|
||||
scp -o StrictHostKeyChecking=no -r frontend/.next root@$SERVER_IP:/var/www/frontend/
|
||||
echo "Frontend artifact copied successfully to $SERVER_IP:/var/www/frontend"
|
||||
|
||||
- name: Publish frontend .next build to Plesk server
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
SERVER_IP: ${{ vars.SERVER_IP }}
|
||||
DOMAIN_NAME: ${{ vars.DOMAIN_NAME }} # optional, helps locate vhost
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
|
||||
echo "Deploying to server: $SERVER_IP"
|
||||
|
||||
#Define Plesk web root (update DOMAIN_NAME in Gitea variables)
|
||||
WEB_ROOT="/var/www/vhosts/${DOMAIN_NAME}/httpdocs"
|
||||
|
||||
ssh -o StrictHostKeyChecking=no root@$SERVER_IP "mkdir -p $WEB_ROOT/.next"
|
||||
ssh -o StrictHostKeyChecking=no root@$SERVER_IP "mkdir -p $WEB_ROOT/public/.htaccess"
|
||||
|
||||
Reference in New Issue
Block a user