From fffff526d0d3141e10d6fc852053af16480a1b76 Mon Sep 17 00:00:00 2001 From: lamtruong28 Date: Wed, 12 Aug 2026 15:34:06 +0700 Subject: [PATCH] Init prj --- .gitea/workflows/ci.yaml | 30 ++++++++++++++++++++++++++++++ index.html | 11 +++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .gitea/workflows/ci.yaml create mode 100644 index.html diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..c0c98ff --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,30 @@ +name: Sync Source to Host + +on: + push: + branches: + - '**' +jobs: + sync-source: + runs-on: ubuntu-latest + + steps: + - name: Sync repository + run: | + REPO_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" + REPO_NAME=$(basename "${GITHUB_REPOSITORY}") + TARGET_DIR="/data/${REPO_NAME}" + BRANCH="${GITHUB_REF_NAME}" + + if [ ! -d "$TARGET_DIR/.git" ]; then + echo "Cloning repository..." + git clone -b "$BRANCH" "$REPO_URL" "$TARGET_DIR" + else + echo "Updating repository..." + git -C "$TARGET_DIR" fetch origin "$BRANCH" + git -C "$TARGET_DIR" checkout "$BRANCH" + git -C "$TARGET_DIR" reset --hard "origin/$BRANCH" + fi + + echo "Current commit:" + git -C "$TARGET_DIR" log --oneline -1 \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..977eb2d --- /dev/null +++ b/index.html @@ -0,0 +1,11 @@ + + + + + + Welcome to Simulators + + +

Welccom to DTS Team

+ + \ No newline at end of file