Skip to content

Commit

Permalink
Enhanced documentation site configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
teogor committed Feb 21, 2024
1 parent 9656467 commit ae0b011
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 32 deletions.
33 changes: 19 additions & 14 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ env:

jobs:
synchronize-documentation:
environment: PRODUCTION
runs-on: ubuntu-latest
name: Synchronize Repository API Documentation
name: Synchronize Repository Documentation
steps:
- uses: actions/checkout@v4

Expand All @@ -44,10 +45,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material
pip install mkdocs-material
pip install mkdocs-material[recommended,git,imaging]
- name: Build MkDocs
run: mkdocs build
run: |
mkdocs build --clean
mkdocs --version
- name: Setup Java
uses: actions/setup-java@v3
Expand All @@ -58,13 +62,13 @@ jobs:
- name: Generate API Documentation
run: ./gradlew -D'org.gradle.unsafe.configuration-cache=false' dokkaHtmlMultiModule

- name: Relocate API Documentation Assets
- name: Relocate API References
run: |
mkdir -p build/docs/${{ env.REPOSITORY }}/documentation
cp -r build/dokka/htmlMultiModule/* build/docs/${{ env.REPOSITORY }}/documentation
mkdir -p build/docs/${{ env.REPOSITORY }}/html
cp -r build/dokka/htmlMultiModule/* build/docs/${{ env.REPOSITORY }}/html
- id: publish-docs
name: Deploy API Documentation
name: Deploy Documentation
uses: ./.github/workflows/sync-docs/
env:
API_TOKEN_GITHUB: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
Expand All @@ -77,6 +81,7 @@ jobs:
destination-branch-create: ${{ env.DESTINATION_BRANCH }}

build-and-deploy:
environment: PRODUCTION
needs: synchronize-documentation
name: Build and Deploy Updated API Documentation
runs-on: ubuntu-latest
Expand All @@ -90,13 +95,13 @@ jobs:
# This is important to fetch the changes to the previous commit
fetch-depth: 0

- name: Prettify code
uses: creyD/prettier_action@v4.3
with:
# This part is also where you can pass other options, for example:
prettier_options: --write ${{ env.REPOSITORY }}/**/*.{js,html,css,json}
only_changed: False
same_commit: True
# - name: Prettify code
# uses: creyD/prettier_action@v4.3
# with:
# # This part is also where you can pass other options, for example:
# prettier_options: --write ${{ env.REPOSITORY }}/**/*.{js,html,css,json}
# only_changed: False
# same_commit: True

- name: Create PR (Pull Request)
run: |
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
name: Publish

on:
release:
types: [ released ]
workflow_dispatch:

jobs:
publish:
name: Snapshot build and publish
runs-on: ubuntu-latest
environment: PRODUCTION
timeout-minutes: 120
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
SONATYPE_CONNECT_TIMEOUT_SECONDS: 120
SONATYPE_CLOSE_TIMEOUT_SECONDS: 1800

steps:
- name: Check out code
uses: actions/checkout@v3.1.0
Expand All @@ -31,6 +29,6 @@ jobs:
- name: Grant Permission to Execute Gradle
run: chmod +x gradlew

- name: Publish to Maven Central
- name: Publish to MavenCentral
run: |
./gradlew :api:publish --no-configuration-cache
121 changes: 108 additions & 13 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,139 @@ site_description: Querent lays the groundwork for your project\'s resource manag
site_author: Teodor Grigor (teogor)
site_dir: build/docs/querent
site_url: https://github.com/teogor/querent
edit_uri: tree/main/docs/
edit_uri: edit/main/docs/

docs_dir: docs

# Navigation
nav:
- 'Overview': index.md
- 'API Documentation': api-documentation.md
- 'Sponsor 🩷': sponsor.md
- 'Security': security.md

# Repository
repo_name: querent
repo_url: https://github.com/teogor/querent

# Copyright
copyright: Copyright © 2024 Teodor Grigor (Teogor)

# Page tree
nav:
- Home:
- Overview: index.md
- Releases:
- releases.md
- Implementation: releases/implementation.md
- Changelog:
- 1.0.0-alpha01: releases/changelog/1.0.0-alpha01.md
- Reference: reference.md
- Sponsor: sponsor.md
- Security: security.md

# Configuration
theme:
name: material
language: en

palette:
primary: \#815CBF
accent: \#8660C4
scheme: slate

# Palette toggle for automatic mode
- media: "(prefers-color-scheme)"
toggle:
icon: material/brightness-auto
name: Switch to light mode

# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode

# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/brightness-4
name: Switch to system preference

font:
text: Roboto
code: JetBrains Mono

features:
- content.tabs.link
- content.code.copy
- announce.dismiss
- content.action.edit
- content.action.view
- content.code.annotate
- content.code.copy
- content.code.select
- content.tabs.link
- content.tooltips
# - header.autohide
- navigation.expand
- navigation.footer
- navigation.indexes
# - navigation.instant
# - navigation.instant.prefetch
# - navigation.instant.progress
# - navigation.prune
- navigation.sections
- navigation.tabs
# - navigation.tabs.sticky
- navigation.top
- navigation.tracking
- search.highlight
- search.share
- search.suggest
- toc.follow
# - toc.integrate

# Plugins
plugins:
- blog
- search:
separator: '[\s\u200b\-_,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])'
- minify:
minify_html: true
minify_css: true

extra:
consent:
actions:
- accept
- manage
title: Cookie consent
description: >-
We use cookies to recognize your repeated visits and preferences, as well
as to measure the effectiveness of our documentation and whether users
find what they're searching for. With your consent, you're helping us to
make our documentation better.
analytics:
name: Google Analytics
checked: true
social:
- icon: fontawesome/brands/github
link: https://github.com/teogor
- icon: fontawesome/brands/instagram
link: https://instagram.com/teo.grigor
- icon: fontawesome/brands/twitter
link: https://x.com/teogor_dev
- icon: fontawesome/solid/paper-plane
link: mailto:open-source@teogor.dev
generator: false
analytics:
provider: google
property: G-XN9N2SV8QZ
feedback:
title: Was this page helpful?
ratings:
- icon: material/emoticon-happy-outline
name: This page was helpful
data: 1
note: >-
Thanks for your feedback!
- icon: material/emoticon-sad-outline
name: This page could be improved
data: 0
note: >-
Thanks for your feedback! Help us improve this page by
using our <a href="..." target="_blank" rel="noopener">feedback form</a>.
# Extensions
markdown_extensions:
Expand Down

0 comments on commit ae0b011

Please sign in to comment.