From adc5b78aa914de6234efe4920a2548e8f0c6854e Mon Sep 17 00:00:00 2001 From: codex Date: Wed, 11 Mar 2026 12:15:51 +0800 Subject: [PATCH] ci: add gitea workflow to deploy docusaurus to openresty --- .gitea/workflows/build.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..6f9ff97 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,33 @@ +name: Build Docusaurus Site + +on: + push: + branches: [main, master] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + run: | + git clone "http://172.17.0.1:3000/${{ github.repository }}.git" . + git checkout "${{ github.sha }}" + + - name: Install dependencies + run: npm install + + - name: Build Docusaurus + run: npm run build + + - name: Deploy to 1Panel OpenResty site + run: | + SITE_DIR="/opt/1panel/apps/openresty/openresty/www/sites/docs.makefire.fun/index" + + mkdir -p "${SITE_DIR}" + rm -rf "${SITE_DIR}"/* + cp -r build/* "${SITE_DIR}/" + + echo "✅ Docs deploy complete" + ls -la "${SITE_DIR}"