ci: add Gitea/Forgejo CI workflow for automated documentation hosting
Some checks failed
Deploy Documentation / build-and-deploy (push) Failing after 59s
Some checks failed
Deploy Documentation / build-and-deploy (push) Failing after 59s
This commit is contained in:
parent
766685a66f
commit
0b7ed72a93
1 changed files with 42 additions and 0 deletions
42
.forgejo/workflows/deploy-docs.yml
Normal file
42
.forgejo/workflows/deploy-docs.yml
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Reference in a new issue