Files
create/.gitea/workflows/docs.yml
forbes-0023 ccc372b2d1
Some checks failed
Build and Test / build (pull_request) Failing after 1m42s
fix(ci): use Docker network hostname for docs runner checkout
The act_runner and gitea containers share the git_default Docker
network. Use http://gitea:3000 (container DNS name) instead of
localhost, which resolves to the runner container itself.
2026-02-09 08:53:39 -06:00

31 lines
649 B
YAML

name: Deploy Docs
on:
push:
branches: [main]
paths:
- "docs/**"
- ".gitea/workflows/docs.yml"
jobs:
build-and-deploy:
runs-on: docs
steps:
- name: Checkout
run: |
REPO_URL="http://gitea:3000/kindred/create.git"
if [ -d .git ]; then
git fetch "$REPO_URL" main
git checkout -f FETCH_HEAD
else
git clone --depth 1 --branch main "$REPO_URL" .
fi
- name: Build mdBook
run: mdbook build docs/
- name: Deploy
run: |
rm -rf /opt/git/docs/book/*
cp -r docs/book/* /opt/git/docs/book/