Commit f2df3460 authored by Nathan Harris's avatar Nathan Harris

Update Jazzy Doc Generation Script

Motivation:

Up until now, Jazzy docs were generated on a private CI runner hosting macOS - which doesn't make CI portable as it requires that runner to always be available.

Modifications:

- Change: CI config to use a Linux Jazzy Docker image for portability
- Change: Doc theme templates to not reference GitHub

Result:

Jazzy docs should be able to be generated at any time, as the CI infrastructure is using GitLab's cloud solution with a Docker image
parent fd73e0ab
Pipeline #70004426 passed with stages
in 4 minutes and 26 seconds
......@@ -7,25 +7,27 @@ pages:
stage: Docs
only:
- tags
image: norionomura/jazzy
tags:
- private-macOS
- docker
variables:
MODULE_NAME: "RediStack"
REPO_URL: "https://gitlab.com/mordil/swift-redi-stack"
script: |
version=$(git describe --abbrev=0 --tags || echo "0.0.0")
export VERSION=$(git describe --abbrev=0 --tags || echo "0.0.0")
swift build
sourcekitten doc --spm-module "RedisNIO" > ./RedisNIO.json
swift package generate-xcodeproj
sourcekitten doc --spm-module "$MODULE_NAME" > "./$MODULE_NAME.json"
jazzy --clean \
--author "Nathan Harris (Mordil)" \
--readme "./README.md" \
--author_url "https://mordil.info" \
--github_url "https://gitlab.com/mordil/swift-redis-nio-client" \
--github-file-prefix https://gitlab.com/mordil/swift-redis-nio-client/blob/$version \
--root-url "https://mordil.gitlab.io/swift-redis-nio-client/docs/RedisNIO" \
--module "RedisNIO" \
--module-version "$version" \
--author_url "https://www.mordil.info" \
--github_url "$REPO_URL" \
--github-file-prefix "$REPO_URL/blob/$VERSION" \
--root-url "https://mordil.gitlab.io/swift-redi-stack/" \
--module "$MODULE_NAME" \
--module-version "$VERSION" \
--theme docs/theme \
--xcodebuild-arguments -scheme,swift-redis-nio-client-Package \
--sourcekitten-sourcefile "./RedisNIO.json" \
--sourcekitten-sourcefile "./$MODULE_NAME.json" \
--output "./public"
artifacts:
paths:
......
......@@ -92,7 +92,7 @@
{{/return}}
{{#github_token_url}}
<div class="slightly-smaller">
<a href="{{{github_token_url}}}">Show on GitHub</a>
<a href="{{{github_token_url}}}">Show on GitLab</a>
</div>
{{/github_token_url}}
</section>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment