Changes to .gitea/workflows/docs.yml itself should also trigger a docs rebuild so workflow fixes are immediately testable.
31 lines
653 B
YAML
31 lines
653 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://localhost: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/
|