incomp-flame-post/.forgejo/workflows/deploy-docs.yml
ignis 783f641896
Some checks failed
Deploy Documentation / build-and-deploy (push) Failing after 1m6s
ci: remove sudo from apt-get as container runs as root
2026-06-01 05:45:31 +00:00

42 lines
1.3 KiB
YAML

name: Deploy Documentation
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: docker # 기본 매핑된 node:20-bookworm 이미지에서 작동
steps:
- name: 저장소 체크아웃
uses: actions/checkout@v4
- name: Install Python & Graphviz
run: |
apt-get update
apt-get install -y python3 python3-pip python3-venv graphviz
- name: Install Python Requirements & Compile Docs
run: |
python3 -m venv venv
. venv/bin/activate
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