Skip to content

Commit

Permalink
update action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianjnuwu committed Sep 9, 2023
1 parent a474ecb commit 9e1b915
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
USER:
description: "An agent, which can be a human or software agent, using a computer or network service."
required: true
PASSWORD:
PASSWORD:
description: "Password to use if SSH key is not provided."
required: false
KEY:
Expand Down Expand Up @@ -44,7 +44,11 @@ runs:
shell: bash
- name: ✨ Removing old files...
run: |
ssh ssh rm -rf "${{ inputs.FOLDER }}";
if [[ -n "${{ inputs.KEY }}" ]]; then
ssh ssh rm -rf "${{ inputs.FOLDER }}";
elif [[ -n "${{ inputs.PASSWORD }}" ]]; then
sshpass -p "$(cat ~/.ssh/password.txt)" ssh ${{ inputs.USER }}@${{ inputs.IP }} rm -rf "${{ inputs.FOLDER }}";
fi
shell: bash
- name: 💧 deploy to vps...
run: |
Expand Down

0 comments on commit 9e1b915

Please sign in to comment.