Posodobitev workflow datoteke za uporabo SSH ključa in dostop do ciljnega strežnika
Deploy to Test Server / deploy (push) Failing after 4s
Details
Deploy to Test Server / deploy (push) Failing after 4s
Details
This commit is contained in:
parent
1ff421ece2
commit
14cddf9a0c
|
|
@ -13,32 +13,15 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Deploy to test server
|
- name: Deploy to test server
|
||||||
uses: appleboy/ssh-action@master
|
shell: bash
|
||||||
with:
|
run: |
|
||||||
host: 152.89.234.215
|
# Izbrišemo obstoječo vsebino v mapi vtičnika
|
||||||
port: 5050
|
ssh -p 5050 -i $GITHUB_WORKSPACE/.gitea/runner/id_rsa_gitea -o StrictHostKeyChecking=no forexana@152.89.234.215 "rm -rf test.forexanalysis.com/wp-content/plugins/custom_wheel\ 2/*"
|
||||||
username: forexana
|
|
||||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
# Naredimo direktno kopiranje z rsync
|
||||||
script: |
|
rsync -avz -e "ssh -p 5050 -i $GITHUB_WORKSPACE/.gitea/runner/id_rsa_gitea -o StrictHostKeyChecking=no" --exclude=".git" --exclude=".gitea" --exclude="id_rsa_gitea*" ./ forexana@152.89.234.215:test.forexanalysis.com/wp-content/plugins/custom_wheel\ 2/
|
||||||
# Izbrišemo obstoječo vsebino v mapi vtičnika
|
|
||||||
rm -rf test.forexanalysis.com/wp-content/plugins/custom_wheel\ 2/*
|
# Nastavimo pravilna dovoljenja
|
||||||
|
ssh -p 5050 -i $GITHUB_WORKSPACE/.gitea/runner/id_rsa_gitea -o StrictHostKeyChecking=no forexana@152.89.234.215 "chmod -R 755 test.forexanalysis.com/wp-content/plugins/custom_wheel\ 2/"
|
||||||
# Ustvarimo začasno mapo za kopiranje
|
|
||||||
mkdir -p /tmp/wheel_deploy
|
echo "Deployment completed successfully!"
|
||||||
|
|
||||||
# Počistimo začasno mapo
|
|
||||||
rm -rf /tmp/wheel_deploy/*
|
|
||||||
|
|
||||||
# Kopiramo novo vsebino v začasno mapo
|
|
||||||
cp -r $GITHUB_WORKSPACE/* /tmp/wheel_deploy/
|
|
||||||
|
|
||||||
# Kopiramo iz začasne mape v ciljno mapo vtičnika
|
|
||||||
cp -r /tmp/wheel_deploy/* test.forexanalysis.com/wp-content/plugins/custom_wheel\ 2/
|
|
||||||
|
|
||||||
# Nastavimo pravilna dovoljenja
|
|
||||||
chmod -R 755 test.forexanalysis.com/wp-content/plugins/custom_wheel\ 2/
|
|
||||||
|
|
||||||
# Počistimo začasno mapo
|
|
||||||
rm -rf /tmp/wheel_deploy
|
|
||||||
|
|
||||||
echo "Deployment completed successfully!"
|
|
||||||
|
|
@ -13,6 +13,10 @@ Thumbs.db
|
||||||
*.sublime-project
|
*.sublime-project
|
||||||
*.sublime-workspace
|
*.sublime-workspace
|
||||||
|
|
||||||
|
# SSH ključi
|
||||||
|
id_rsa_*
|
||||||
|
.gitea/runner/id_rsa_*
|
||||||
|
|
||||||
# WordPress specific files
|
# WordPress specific files
|
||||||
*.log
|
*.log
|
||||||
wp-config.php
|
wp-config.php
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue