docs: build multi-version documentation (#327)

* Build multi-version docs with 'mike'

Signed-off-by: Dmytro Bondar <git@bonddim.com>

* Revert remote_branch option

---------

Signed-off-by: Dmytro Bondar <git@bonddim.com>
This commit is contained in:
Dmytro Bondar 2024-12-03 19:04:43 +01:00 committed by GitHub
parent afcba8d43e
commit ba9b6c39e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 33 additions and 21 deletions

View File

@ -1,22 +1,29 @@
name: github-pages
on:
push:
branches:
- master
branches: [master]
tags: ["v*"]
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: actions/cache@v4
with:
key: ${{ github.ref }}
path: .cache
- run: pip install mkdocs-material
- run: pip install pillow cairosvg
- run: mkdocs gh-deploy --force
- name: Install dependencies
run: pip install mike mkdocs-material[imaging] mkdocs-minify-plugin
- name: Publish documentation
run: mike deploy --push --update-aliases ${{ github.ref_name }} latest
env:
GIT_COMMITTER_NAME: "github-actions[bot]"
GIT_COMMITTER_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"

View File

@ -327,7 +327,7 @@
<div class="md-container">
<div class="tx-hero__image">
<img
src="{{config.site_url}}assets/images/screenshot.png"
src="{{config.site_url}}/assets/images/screenshot.png"
alt=""
draggable="false"
>
@ -356,7 +356,7 @@
<div class="second-column">
<div class="image-wrapper">
<img
src="{{config.site_url}}assets/images/wg-tool.png"
src="{{config.site_url}}/assets/images/wg-tool.png"
alt=""
draggable="false"
>

View File

@ -1,13 +1,14 @@
# build with MkDocs 1.5.3, mkdocs-material-9.4.7
---
site_name: WireGuard Portal
site_description: 'Manage WireGuard Peers and Interface using a beautiful and simple web UI.'
site_url: https://wgportal.org
repo_name: 'h44z/wg-portal'
repo_url: 'https://github.com/h44z/wg-portal'
copyright: 'Copyright &copy; 2023-2024 WireGuard Portal Project'
site_description: Manage WireGuard Peers and Interface using a beautiful and simple web UI.
site_url: https://wgportal.org/
repo_name: h44z/wg-portal
repo_url: https://github.com/h44z/wg-portal
copyright: Copyright &copy; 2023-2024 WireGuard Portal Project
extra_css:
- stylesheets/extra.css
theme:
name: material
custom_dir: docs/theme-overrides
@ -18,15 +19,19 @@ theme:
favicon: assets/images/favicon-large.png
language: en
features:
- tabs
- instant
- navigation.instant
- navigation.tabs
plugins:
- search
#- social # disable until https://github.com/squidfunk/mkdocs-material/issues/6983 is resolved
- social
- minify:
minify_html: true
extra:
version:
provider: mike
default: latest
social:
- icon: fontawesome/brands/github-alt
link: https://github.com/h44z/wg-portal