Skip to content

Commit af7c2a9

Browse files
version@one (#1)
2 parents 7c12cd2 + 9c558ef commit af7c2a9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ jobs:
1414
IP: ${{ secrets.IP }}
1515
USER: ${{ secrets.USER }}
1616
KEY: ${{ secrets.KEY }}
17-
REPO: 'ssh-action-deploy'
1817
FOLDER: 'root/.deploy'
1918
RUN: 'ls -a; pwd'

action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ inputs:
1717
required: true
1818
REPO:
1919
description: 'Put the name of the repository where the action is.'
20-
required: true
20+
default: ${{ github.repository }}
2121
FOLDER:
2222
description: 'Name of the folder where the files are located.'
2323
required: true
@@ -52,7 +52,10 @@ runs:
5252
- name: 💧 deploy to vps...
5353
run: |
5454
cd ..
55-
scp -r ${{ inputs.REPO }} ssh:/${{ inputs.FOLDER }}
55+
IN="${{ inputs.REPO }}"
56+
set -- "$IN"
57+
IFS="/"; declare -a Array=($*)
58+
scp -r ${Array[1]} ssh:/${{ inputs.FOLDER }}
5659
shell: bash
5760
- name: 🍷 Executing commands...
5861
run: ssh ssh "${{ inputs.RUN }}"

0 commit comments

Comments
 (0)