Skip to content

Commit

Permalink
#27 - Remove CNAME. Improve docs-publish.yaml workflow. Refactor them…
Browse files Browse the repository at this point in the history
…e.features in mkdocs.yml.
  • Loading branch information
anovikov-el committed Aug 21, 2024
1 parent 589ef66 commit fd37027
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 34 deletions.
34 changes: 14 additions & 20 deletions .github/workflows/docs-publish.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
name: Build and publish documentation to GitHub Pages
name: Build, validate, publish, version documentation for GitHub Pages

on:
push:
branches:
- feature/*
- master
# tags:
# - 'v[0-9]+.[0-9]+.[0-9]+'
- develop
- feature/*
- release/*
- hotfix/*
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
build:
publish:
name: Build, validate, publish, version documentation for GitHub Pages
runs-on: ubuntu-22.04
# container:
# image: python:3.9
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -24,24 +26,16 @@ jobs:

- name: Build, validate documentation using MkDocs
run: |
# todo check if it is needed
# git config --global --add safe.directory /__w/rmk/rmk
mkdocs build --verbose --clean --strict
rm -r site/
- name: Configure Git
# if: startsWith(github.ref, 'refs/tags/')
id: git-configuration
- name: Build, publish, version documentation using Mike (only for stable tags)
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "Configure Git user.name and user.email."
git config user.name github-actions
git config user.email [email protected]
# todo remove tag hardcode used for tests
# echo tag=${GITHUB_REF#refs/tags/} >> "${GITHUB_OUTPUT}"
echo tag=v0.43.0 >> "${GITHUB_OUTPUT}"
- name: Build, publish, version documentation using Mike
# if: startsWith(github.ref, 'refs/tags/')
run: |
mike deploy --update-aliases --push --rebase ${{ steps.git-configuration.outputs.tag }} latest
VERSION=${GITHUB_REF#refs/tags/}
mike deploy --update-aliases --push --rebase "${VERSION}" latest
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:

jobs:
goreleaser:
name: Release RMK using GoReleaser
runs-on: ubuntu-22.04
steps:
- name: Checkout
Expand Down
1 change: 0 additions & 1 deletion docs/CNAME

This file was deleted.

24 changes: 11 additions & 13 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Project information
site_name: RMK
site_description: RMK CLI - Reduced Management for Kubernetes by Edenlab LLC.
# todo change to static domain
site_url: https://edenlabllc.github.io/rmk

copyright: © EDENLAB. ALL RIGHTS RESERVED, 2021 - 2024
Expand All @@ -15,34 +14,33 @@ theme:
name: material
language: en
features:
- navigation.top # show back to top button
- search.suggest # search suggestions: https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-search/#search-suggestions
- search.highlight # highlight search term on target page: https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-search/#search-suggestions
# https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-search/
- search.highlight
- search.share
- search.suggest
# https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/
- navigation.expand
- navigation.indexes
- navigation.instant
- navigation.tabs
- navigation.tabs.sticky # stick navigation tabs below header while scrolling
- navigation.top # show back to top button
- navigation.tracking
- navigation.path
# todo review list of features
# - navigation.instant
# - navigation.sections
# - navigation.indexes
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
primary: "black"
accent: "grey"
primary: black
accent: grey
toggle:
icon: material/toggle-switch-off-outline
name: Switch to dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: light blue
primary: black
toggle:
icon: material/toggle-switch
name: Switch to light mode
# todo change icons and logo
# logo: https://edenlab.io/wp-content/themes/edenlab/assets/images/fhir_icon.svg
favicon: https://edenlab.io/favicon.ico
icon:
repo: fontawesome/brands/github
Expand Down

0 comments on commit fd37027

Please sign in to comment.