Compare commits
3 commits
8d307a881d
...
3981f79461
Author | SHA1 | Date | |
---|---|---|---|
3981f79461 | |||
fe35981063 | |||
84fd11ad60 |
2 changed files with 38 additions and 1 deletions
37
deploy_user/action.yml
Normal file
37
deploy_user/action.yml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
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 -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 }}
|
|
@ -1,4 +1,4 @@
|
||||||
name: 'Deploy to Skynet'
|
name: 'Get LFS objects in teh git repo'
|
||||||
description: 'Pull LFS objects, its borked otherwise on gitea/forgejo'
|
description: 'Pull LFS objects, its borked otherwise on gitea/forgejo'
|
||||||
inputs:
|
inputs:
|
||||||
repository:
|
repository:
|
||||||
|
|
Loading…
Reference in a new issue