feat: basic action to copy files across

This commit is contained in:
silver 2024-09-22 22:21:19 +01:00
parent 84fd11ad60
commit fe35981063
Signed by untrusted user: silver
GPG key ID: 36F93D61BAD3FD7D

26
deploy_user/action.yml Normal file
View file

@ -0,0 +1,26 @@
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: "Pull LFS objects"
shell: bash
run: |
# jank I know
echo "${{ inputs.ssh_key }}" > tmp.key
chmod 600 tmp.key
scp -v -i tmp.key -r ${{ inputs.folder }}/* ${{ inputs.username }}@skynet.skynet.ie:/home/${{ inputs.username }}/public_html/${{ inputs.destination }}