convert
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 10s
Gitea Actions Demo / Explore-Gitea-Actions-2 (pull_request) Successful in 2s
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 13s
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 10s
Gitea Actions Demo / Explore-Gitea-Actions-2 (pull_request) Successful in 2s
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 13s
This commit is contained in:
@ -105,9 +105,25 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
||||||
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
|
||||||
echo "vars.SERVER_IP: $vars.SERVER_IP"
|
echo "vars.SERVER_IP: $vars.SERVER_IP"
|
||||||
echo "vars.DOMAIN_NAME: $vars.DOMAIN_NAME"
|
echo "vars.DOMAIN_NAME: $vars.DOMAIN_NAME"
|
||||||
|
|
||||||
|
cat ~/.ssh/id_rsa | head -3
|
||||||
|
|
||||||
|
# Convert if it's a PEM key
|
||||||
|
if grep -q "BEGIN PRIVATE KEY" ~/.ssh/id_rsa; then
|
||||||
|
echo "Converting PKCS#8 key to OpenSSH-compatible RSA key..."
|
||||||
|
openssl rsa -in ~/.ssh/id_rsa -out ~/.ssh/id_rsa.openssh >/dev/null 2>&1
|
||||||
|
mv ~/.ssh/id_rsa.openssh ~/.ssh/id_rsa
|
||||||
chmod 600 ~/.ssh/id_rsa
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "SSH key ready for use:"
|
||||||
|
ssh-keygen -lf ~/.ssh/id_rsa
|
||||||
|
|
||||||
ssh -o StrictHostKeyChecking=no root@$SERVER_IP "mkdir -p /var/www/frontend"
|
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/
|
scp -o StrictHostKeyChecking=no -r frontend/.next root@$SERVER_IP:/var/www/frontend/
|
||||||
echo "Frontend artifact copied successfully to $SERVER_IP:/var/www/frontend"
|
echo "Frontend artifact copied successfully to $SERVER_IP:/var/www/frontend"
|
||||||
|
|||||||
Reference in New Issue
Block a user