From d5748666a1aff8891fe8852b98de5b24ba758040 Mon Sep 17 00:00:00 2001 From: maxkey52 Date: Sun, 1 Mar 2026 18:19:35 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20.gitea/workflows/pages.yam?= =?UTF-8?q?l?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/pages.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .gitea/workflows/pages.yaml diff --git a/.gitea/workflows/pages.yaml b/.gitea/workflows/pages.yaml new file mode 100644 index 0000000..ebacd9e --- /dev/null +++ b/.gitea/workflows/pages.yaml @@ -0,0 +1,31 @@ +name: Deploy Pages + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: self-hosted + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set variables + id: vars + run: | + echo "USERNAME=${GITHUB_REPOSITORY_OWNER}" >> $GITHUB_OUTPUT + echo "REPO=${GITHUB_REPOSITORY#*/}" >> $GITHUB_OUTPUT + + - name: Deploy to pages directory + run: | + USERNAME=${{ steps.vars.outputs.USERNAME }} + REPO=${{ steps.vars.outputs.REPO }} + + TARGET=/data/pages/$USERNAME/$REPO + + mkdir -p $TARGET + rm -rf $TARGET/* + cp -r ./* $TARGET/ \ No newline at end of file