mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
fcbe11616d
More docs-related commits will follow, but this needs to be merged in order to continue with other development. * Docs: Overhaul docs generator (beginning) * docs: Rename comments file * docs: Move comments gitignore * docs: Initial request documentation * docs: Improvements to comment processing * docs: More improvements * docs: Add enum functionality for protocol.json * WebSocketServer: Document enums * RequestHandler: Document RequestStatus enum * Base: Move ObsWebSocketRequestBatchExecutionType to its own file Moves it to its own file, renaming it to `RequestBatchExecutionType`. Changes the RPC to use integer values for selecting execution type instead of strings. * docs: Update introduction header Removes the enum section, and documents RequestBatchExecutionType. * WebSocketCloseCode: Shuffle a bit * Base: Use `field` instead of `key` or `parameter` in most places * RequestStatus: Mild shuffle It was really bothering me that OutputPaused and OutputNotPaused had to be separated, so we're breaking it while we're breaking other stuff. * docs: Delete old files They may be added back in some form, but for now I'm getting them out of the way. * docs: Add enum identifier value Forgot to add this before, oops * docs: Document more enums * docs: Add basic protocol.md generator * docs: More work on MD generator * docs: MD generator should be finished now * docs: More fixes * docs: More fixes * docs: More tweaks + add readme * docs: Update readme and add inputs docs * docs: More documentation
37 lines
891 B
Bash
Executable File
37 lines
891 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
echo "-- Generating documentation."
|
|
echo "-- Node version: $(node -v)"
|
|
echo "-- NPM version: $(npm -v)"
|
|
echo "-- Python3 version: $(python3 -V)"
|
|
|
|
git fetch origin
|
|
git checkout ${CHECKOUT_REF/refs\/heads\//}
|
|
|
|
cd docs
|
|
bash build_docs.sh
|
|
|
|
echo "-- Documentation successfully generated."
|
|
|
|
if git diff --quiet; then
|
|
echo "-- No documentation changes to commit."
|
|
exit 0
|
|
fi
|
|
|
|
# Exit if we aren't a CI run to prevent messing with the current git config
|
|
if [ -z "${IS_CI}" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
REMOTE_URL="$(git config remote.origin.url)"
|
|
TARGET_REPO=${REMOTE_URL/https:\/\/github.com\//github.com/}
|
|
GITHUB_REPO=https://${GH_TOKEN:-git}@${TARGET_REPO}
|
|
|
|
git config user.name "Github Actions"
|
|
git config user.email "$COMMIT_AUTHOR_EMAIL"
|
|
|
|
git add ./generated
|
|
git pull
|
|
git commit -m "docs(ci): Update generated docs - $(git rev-parse --short HEAD) [skip ci]"
|
|
git push -q $GITHUB_REPO
|