源文件:11-docs-auto-publish-publish-docs-site.md

# 11. Docs Auto Publish: publish-docs-site

This document records the automatic sync and publish helper for the docs site.

# Script

  • live path: /usr/local/bin/publish-docs-site
  • exported copy: scripts/publish-docs-site

# Purpose

Turn the docs site refresh into one command.

It performs all of the following:

  1. sync toolkit markdown files into /srv/git/docs.v4.sohophp.app/docs-content
  2. optionally commit the repo update as user git
  3. rebuild manifest.txt
  4. rebuild files.sha256
  5. rebuild node-cicd-toolkit.tar.gz
  6. rebuild node-cicd-toolkit.sha256
  7. unpack and verify the new bundle
  8. redeploy docs.v4.sohophp.app
  9. run an HTTPS smoke test

# Example usage


sudo /usr/local/bin/publish-docs-site


Skip the repo commit if you only want a content refresh and deploy:


sudo /usr/local/bin/publish-docs-site --skip-commit


# Why this exists

Without this helper, refreshing the docs site requires multiple manual steps and it is easy to forget one of:

  • repo sync
  • manifest regeneration
  • checksum regeneration
  • safe tarball output path
  • redeploy
  • smoke verification

# Validation target

Successful output includes:

  • bundle verification lines ending in OK
  • deploy output from cicd-deploy-node-site
  • live README grep hits from https://docs.v4.sohophp.app/doc/README.md
  • current checksum output from /download/node-cicd-toolkit.sha256
  • optional --skip-commit mode for content-only refreshes