Skip to content

Commit

Permalink
[+] add docs versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
pashagolub committed Dec 16, 2024
1 parent acb79bb commit 5028f1c
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
37 changes: 36 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ jobs:
name: Build Docker Image
runs-on: ubuntu-latest
steps:

- name: Check out code
uses: actions/checkout@v4

- name: Build Docker Image
shell: bash
run: |
Expand All @@ -132,4 +134,37 @@ jobs:
--build-arg GIT_HASH=`git show -s --format=%H HEAD` \
--build-arg VERSION=`git rev-parse --abbrev-ref HEAD` \
-t cybertecpostgresql/pgwatch:latest \
-f docker/Dockerfile .
-f docker/Dockerfile .
build-docs:
if: true # false to skip job during debug
needs: build
name: Build Docs
runs-on: ubuntu-latest
steps:

- name: Check out code
uses: actions/checkout@v4

- name: Set up Golang
uses: actions/setup-go@v5
with:
go-version: '1.23'

- name: Set up gopages
run: go install github.com/johnstarich/go/[email protected]

- name: Build Developer Docs
run: gopages -out "docs/godoc" -base "/godoc" -internal

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: 'pip'

- name: Install dependencies
run: pip install mkdocs-material mkdocs-glightbox

- name: Build mkdocs
run: mkdocs build
8 changes: 8 additions & 0 deletions docs/_overrides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% extends "base.html" %}

{% block outdated %}
You're not viewing the latest version.
<a href="{{ '../' ~ base_url }}">
<strong>Click here to go to latest.</strong>
</a>
{% endblock %}
6 changes: 5 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,8 @@ markdown_extensions:
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
- attr_list
- attr_list

extra:
version:
provider: mike

0 comments on commit 5028f1c

Please sign in to comment.