Add action.yml

This commit is contained in:
2025-08-15 14:47:50 +03:00
commit 0f36526146

19
action.yml Normal file
View File

@@ -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/"