commit 0f36526146c2f69e5338eb18385fe1b60e143358 Author: yigid balaban Date: Fri Aug 15 14:47:50 2025 +0300 Add action.yml diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..202dfbf --- /dev/null +++ b/action.yml @@ -0,0 +1,19 @@ +name: Deploy to yiGit Sites +description: Deploys a static site to yiGit Sites hosting +author: Yigid BALABAN +inputs: + root: + description: Directory containing built site + default: "." +runs: + using: "composite" + steps: + - shell: sh + run: | + set -e + USERNAME=$(echo "${GITHUB_REPOSITORY}" | cut -d'/' -f1) + REPO=$(echo "${GITHUB_REPOSITORY}" | cut -d'/' -f2) + TARGET="/srv/sites/${USERNAME}/${REPO}" + mkdir -p "$TARGET" + rm -rf "$TARGET"/* + cp -r "${{ inputs.root }}/." "$TARGET/"