Add action.yml
This commit is contained in:
19
action.yml
Normal file
19
action.yml
Normal 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/"
|
||||
Reference in New Issue
Block a user