Revert to positional arguments
This commit is contained in:
parent
0ac14c6c99
commit
c7a9a8f2ab
@ -16,6 +16,10 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'Dockerfile'
|
image: 'Dockerfile'
|
||||||
|
args:
|
||||||
|
- ${{ inputs.local_path }}
|
||||||
|
- ${{ inputs.deploy_path }}
|
||||||
|
- ${{ inputs.restart_nginx }}
|
||||||
env:
|
env:
|
||||||
INPUT_LOCAL_PATH: ${{ inputs.local_path }}
|
INPUT_LOCAL_PATH: ${{ inputs.local_path }}
|
||||||
INPUT_DEPLOY_PATH: ${{ inputs.deploy_path }}
|
INPUT_DEPLOY_PATH: ${{ inputs.deploy_path }}
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#!/bin/sh -l
|
#!/bin/sh -l
|
||||||
|
|
||||||
|
LOCAL_PATH="$1"
|
||||||
|
DEPLOY_PATH="$2"
|
||||||
|
RESTART_NGINX="$3"
|
||||||
|
|
||||||
env
|
env
|
||||||
|
|
||||||
rsync -hrz --delete -C --exclude=".*" -e ssh "$INPUT_LOCAL_PATH" "deploy.sixohthree.com:/tmp/gitea_${GITHUB_RUN_NUMBER}_${GITHUB_SHA}"
|
rsync -hrz --delete -C --exclude=".*" -e ssh "$LOCAL_PATH" "deploy.sixohthree.com:/tmp/gitea_${GITHUB_RUN_NUMBER}_${GITHUB_SHA}"
|
||||||
ssh deploy.sixohthree.com "dsh -M -c -r ssh -g webs -- rsync -hvrz --delete -C -e ssh deploy.sixohthree.com:/tmp/gitea_${GITHUB_RUN_NUMBER}_${GITHUB_SHA}/ $INPUT_DEPLOY_PATH"
|
ssh deploy.sixohthree.com "dsh -M -c -r ssh -g webs -- rsync -hvrz --delete -C -e ssh deploy.sixohthree.com:/tmp/gitea_${GITHUB_RUN_NUMBER}_${GITHUB_SHA}/ $DEPLOY_PATH"
|
||||||
ssh deploy.sixohthree.com "rm -rf /tmp/gitea_${GITHUB_RUN_NUMBER}_${GITHUB_SHA}"
|
ssh deploy.sixohthree.com "rm -rf /tmp/gitea_${GITHUB_RUN_NUMBER}_${GITHUB_SHA}"
|
||||||
|
|
||||||
if [ "$INPUT_RESTART_NGINX" ]; then
|
if [ "$RESTART_NGINX" = "1"]; then
|
||||||
ssh deploy.sixohthree.com "dsh -M -c -r ssh -g webs -- sudo systemctl reload nginx"
|
ssh deploy.sixohthree.com "dsh -M -c -r ssh -g webs -- sudo systemctl reload nginx"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user