-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
gonzalo
committed
Apr 1, 2024
1 parent
e8a25cb
commit 9b48db4
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Flujo trabajo SSH | ||
|
||
on: | ||
push: | ||
branches: | ||
- gonzalo-compras # Cambiar a la rama correspondiente si es diferente | ||
|
||
jobs: | ||
ssh_job: | ||
name: SSH Job | ||
runs-on: ubuntu-latest # Se puede cambiar a otra versión o SO según sea necesario | ||
|
||
steps: | ||
- name: Checkout del código | ||
uses: actions/checkout@v2 | ||
|
||
- name: Ejecutar comando SSH | ||
uses: appleboy/ssh-action@master | ||
env: | ||
REMOTE_HOST: ${{ env.REMOTE_HOST }} | ||
REMOTE_USER: ${{ env.REMOTE_USER }} | ||
PEM_FILE: ${{ env.SSH_PRIVATE_KEY }} | ||
with: | ||
host: ${{ env.REMOTE_HOST }} | ||
username: ${{ env.REMOTE_USER }} | ||
key: ${{ env.PEM_FILE }} | ||
script: | | ||
sudo rm -rf /opt/montoto || true |