🏗️ Build and Test JellyTau / Run Tests (push) Successful in 4m59s
Publish Documentation / Build & publish docs to gitea-pages (push) Failing after 5m23s
Traceability Validation / Check Requirement Traces (push) Successful in 15s
Build & Release / Run Tests (push) Successful in 5m5s
🏗️ Build and Test JellyTau / Android Compile Check (push) Successful in 4m41s
Build & Release / Build Linux (push) Successful in 17m20s
Build & Release / Build Android (push) Successful in 22m29s
Build & Release / Create Release (push) Successful in 5s
bun is already baked into the jellytau-builder image (Dockerfile.builder), so oven-sh/setup-bun@v1 was redundant. Fetching that GitHub-hosted action from the self-hosted Gitea runner hangs the job before any steps run. Removed from traceability-check, traceability, and publish-docs workflows; build-and-test and build-release never used it and never stalled.
123 lines
4.6 KiB
YAML
123 lines
4.6 KiB
YAML
name: Publish Documentation
|
|
|
|
# Renders the markdown docs (docs/*.md) into an mdBook site, builds the Rust
|
|
# API reference with cargo doc, and force-pushes the combined output to the
|
|
# orphan `gitea-pages` branch that the Gitea Pages server serves.
|
|
#
|
|
# The published matrix is regenerated during the build, so it is never stale.
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
concurrency:
|
|
# Only one docs publish at a time; a newer push supersedes an in-flight run.
|
|
group: publish-docs
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
publish-docs:
|
|
name: Build & publish docs to gitea-pages
|
|
runs-on: linux/amd64
|
|
container:
|
|
image: gitea.tourolle.paris/dtourolle/jellytau-builder:latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
# bun is baked into jellytau-builder (see Dockerfile.builder); no setup-bun
|
|
# action needed — fetching it stalls on this Gitea runner.
|
|
- name: Install dependencies
|
|
run: bun install
|
|
|
|
- name: Install mdBook
|
|
run: |
|
|
set -e
|
|
MDBOOK_VERSION=v0.4.40
|
|
URL="https://github.com/rust-lang/mdBook/releases/download/${MDBOOK_VERSION}/mdbook-${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz"
|
|
echo "⬇️ Downloading mdBook ${MDBOOK_VERSION}"
|
|
curl -fsSL "$URL" | tar -xz -C /usr/local/bin
|
|
mdbook --version
|
|
|
|
- name: Regenerate traceability matrix (keep published copy current)
|
|
run: bun run traces:markdown
|
|
|
|
- name: Assemble mdBook sources
|
|
run: |
|
|
set -e
|
|
# mdBook's src is docs/. Drop in the SUMMARY and the generated
|
|
# intro + API redirect pages (build artifacts, not committed).
|
|
cp docs-site/SUMMARY.md docs/SUMMARY.md
|
|
|
|
cat > docs/README.md <<'EOF'
|
|
# JellyTau Documentation
|
|
|
|
Cross-platform Jellyfin client — business logic in a Rust backend,
|
|
SvelteKit + TypeScript frontend, talking over Tauri v2 IPC.
|
|
|
|
- **[Requirements Specification](requirements.md)** — user, integration, and development requirements.
|
|
- **[Traceability Matrix](traceability.md)** — generated map from requirements to code (regenerated on every publish).
|
|
- **[Architecture](architecture/README.md)** — backend, frontend, data flow, platform backends.
|
|
- **[Rust API Reference](api/index.html)** — rustdoc for the `src-tauri` backend.
|
|
|
|
_This site is published automatically from `master` by the `publish-docs` CI job._
|
|
EOF
|
|
|
|
cat > docs/api-redirect.md <<'EOF'
|
|
# Rust API Reference
|
|
|
|
The full backend API reference is generated by `cargo doc` (rustdoc).
|
|
|
|
👉 **[Open the Rust API Reference](api/index.html)**
|
|
EOF
|
|
|
|
- name: Build mdBook site
|
|
run: mdbook build docs-site --dest-dir "$GITHUB_WORKSPACE/site"
|
|
|
|
- name: Build Rust API docs (cargo doc)
|
|
working-directory: src-tauri
|
|
# --no-deps keeps it to our own crate (fast, focused); document private
|
|
# items so internal modules/commands appear.
|
|
run: |
|
|
cargo doc --no-deps --document-private-items
|
|
# The backend modules/commands live in the LIB crate (jellytau_lib);
|
|
# the bin crate (jellytau) is a near-empty shim. Land on the lib.
|
|
echo '<meta http-equiv="refresh" content="0; url=jellytau_lib/index.html">' \
|
|
> target/doc/index.html
|
|
|
|
- name: Assemble published output
|
|
run: |
|
|
set -e
|
|
mkdir -p "$GITHUB_WORKSPACE/site/api"
|
|
cp -r src-tauri/target/doc/. "$GITHUB_WORKSPACE/site/api/"
|
|
# Disable Jekyll processing on the pages branch.
|
|
touch "$GITHUB_WORKSPACE/site/.nojekyll"
|
|
ls -la "$GITHUB_WORKSPACE/site"
|
|
|
|
- name: Push to gitea-pages branch
|
|
env:
|
|
# PAT preferred; falls back to the auto-provided token (same pattern
|
|
# as build-release.yml).
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
AUTO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
set -e
|
|
TOKEN="${GITEA_TOKEN:-$AUTO_TOKEN}"
|
|
REPO="${GITHUB_REPOSITORY}"
|
|
HOST="$(echo "$GITHUB_SERVER_URL" | sed -E 's#^https?://##')"
|
|
REMOTE="https://oauth2:${TOKEN}@${HOST}/${REPO}.git"
|
|
|
|
cd "$GITHUB_WORKSPACE/site"
|
|
git init -q
|
|
git config user.name "gitea-actions"
|
|
git config user.email "actions@gitea.tourolle.paris"
|
|
git checkout -q -b gitea-pages
|
|
git add -A
|
|
git commit -q -m "docs: publish site from ${GITHUB_SHA::8}"
|
|
echo "🚀 Force-pushing to gitea-pages"
|
|
git push -f "$REMOTE" gitea-pages
|