From 3981f79461cbf9c73e43ee2913061b4a1d9e08c6 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Sun, 22 Sep 2024 22:26:50 +0100 Subject: [PATCH] feat: the action does a lot more heavy lifting now --- deploy_user/action.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 }}