diff --git a/deploy_user/action.yml b/deploy_user/action.yml index ded468b..83d8f9b 100644 --- a/deploy_user/action.yml +++ b/deploy_user/action.yml @@ -17,10 +17,21 @@ inputs: runs: using: "composite" steps: - - name: "Pull LFS objects" + - name: "Set SSH key" shell: bash run: | # jank I know echo "${{ inputs.ssh_key }}" > tmp.key chmod 600 tmp.key + - name: "Ensure public_html exists" + shell: bash + run: | + ssh -v -i tmp.key ${{ inputs.username }}@skynet.skynet.ie "mkdir -p -f ~/public_html && chmod 711 ~ && chmod -R 755 ~/public_html" + - name: "Ensure destination exists" + shell: bash + run: | + ssh -v -i tmp.key ${{ inputs.username }}@skynet.skynet.ie "mkdir -p -f ~/public_html/${{ inputs.destination }}" + - name: "Copy files across" + shell: bash + run: | scp -v -i tmp.key -r ${{ inputs.folder }}/* ${{ inputs.username }}@skynet.skynet.ie:/home/${{ inputs.username }}/public_html/${{ inputs.destination }}