name: 'Deploy to Skynet - User Edition' description: 'Deploy to your own public_html ' inputs: ssh_key: description: 'Pass in secrets.SSH_KEY' required: true username: description: 'Pass in secrets.USERNAME' required: true folder: description: 'Folder to upload, normally build' required: true destination: description: 'location within public_html to deploy to' required: false default: "" runs: using: "composite" steps: - 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 ~/public_html && chmod 711 ~ || true && chmod -R 755 ~/public_html || true" - name: "Ensure destination exists" shell: bash run: | ssh -v -i tmp.key ${{ inputs.username }}@skynet.skynet.ie "mkdir -p ~/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 }}