From 0b7ed72a9368cb64eb7a923ca0eb6373f5479f55 Mon Sep 17 00:00:00 2001 From: ignis Date: Mon, 1 Jun 2026 04:34:56 +0000 Subject: [PATCH] ci: add Gitea/Forgejo CI workflow for automated documentation hosting --- .forgejo/workflows/deploy-docs.yml | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .forgejo/workflows/deploy-docs.yml diff --git a/.forgejo/workflows/deploy-docs.yml b/.forgejo/workflows/deploy-docs.yml new file mode 100644 index 0000000..5d162fb --- /dev/null +++ b/.forgejo/workflows/deploy-docs.yml @@ -0,0 +1,42 @@ +name: Deploy Documentation + +on: + push: + branches: + - master + +jobs: + build-and-deploy: + runs-on: docker # gitea-pages 스택의 runner 가 docker 라벨로 등록됨 + container: + image: python:3.11-bookworm + steps: + - name: 저장소 체크아웃 + uses: actions/checkout@v4 + + - name: Install System Dependencies (Graphviz for FORD) + run: | + apt-get update + apt-get install -y graphviz + + - name: Install Python Requirements & Compile Docs + run: | + pip install -r requirements.txt + python3 build_docs.py + + - name: gh-pages 브랜치로 site/ 배포 + env: + # Forgejo Actions 가 자동 주입 — 추가 secret 등록 불필요 + DEPLOY_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + ACTOR: ${{ github.actor }} + run: | + cd site + git init -b master + git config user.name "Forgejo Actions Bot" + git config user.email "actions@1gnis-git.duckdns.org" + git add . + git commit -m "Auto-deploy Docs (${GITHUB_SHA::8})" + git push --force \ + "https://${ACTOR}:${DEPLOY_TOKEN}@1gnis-git.duckdns.org/${REPO}.git" \ + master:gh-pages