Files
deploy-yigitsites/action.yml
2025-08-15 14:47:50 +03:00

20 lines
544 B
YAML

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