diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 0697a9f9..731b2456 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -27,11 +27,7 @@ jobs: sed -i.bak "s/title:\(.*\)/title:\1 ($ESCAPED_REF_NAME)/g" .jazzy.yaml - name: Generate Documentation with Jazzy - run: | - SDK_PATH=`xcrun --sdk iphonesimulator --show-sdk-path` - SDK_VERSION=`xcrun --sdk iphonesimulator --show-sdk-version` - bundle exec jazzy \ - --build-tool-arguments "--sdk,${SDK_PATH},-Xswiftc,-sdk,-Xswiftc,$SDK_PATH,-Xswiftc,-target,-Xswiftc,arm64-apple-ios${SDK_VERSION}-simulator" + run: make docs - name: Fix Invalid URLs run: | diff --git a/Makefile b/Makefile index 1d44dcc6..8f6b7124 100644 --- a/Makefile +++ b/Makefile @@ -312,7 +312,22 @@ lint: dprint check "**/*.{md,json,yaml,yml}" # ============================================================================ -# HELP & DOCUMENTATION +# DOCUMENTATION +# ============================================================================ + +## Generate documentation using Jazzy +# +# Generates documentation for the TPPDF project using Jazzy. +.PHONY: docs +docs: + SDK_PATH=$$(xcrun --sdk iphonesimulator --show-sdk-path); \ + echo "SDK Path: $$SDK_PATH"; \ + SDK_VERSION=$$(xcrun --sdk iphonesimulator --show-sdk-version); \ + echo "SDK Version: $$SDK_VERSION"; \ + bundle exec jazzy --build-tool-arguments "--sdk,$$SDK_PATH,-Xswiftc,-sdk,-Xswiftc,$$SDK_PATH,-Xswiftc,-target,-Xswiftc,arm64-apple-ios$$SDK_VERSION-simulator" + +# ============================================================================ +# HELP # ============================================================================ # Reusable awk script for detailed help output