Skip to content

Commit 47cdcae

Browse files
authored
Merge pull request #225 from sych74/master
ASUP-340
2 parents b0fd23a + 62d0887 commit 47cdcae

4 files changed

Lines changed: 43 additions & 7 deletions

File tree

.github/workflows/main.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
steps:
1111
- name: Checkout code
1212
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
1315

1416
- name: Set up Go
1517
uses: actions/setup-go@v4
@@ -31,11 +33,23 @@ jobs:
3133
pip install --upgrade pip
3234
pip install pipenv
3335
pipenv lock --clear
34-
pipenv install --deploy --system
36+
pipenv install --dev --deploy
37+
38+
- name: Fetch all branches
39+
run: |
40+
git fetch --all --prune
3541
36-
- name: Build documentation
42+
- name: Build documentation (all versions)
3743
run: |
38-
task build
44+
# Determine latest version from mkdocs.yml (last line in extra.versions)
45+
LATEST_VERSION="$(tail -n 1 mkdocs.yml | sed 's/://')"
46+
echo "Latest documentation version: ${LATEST_VERSION}"
47+
48+
# Build all versions using mkdocs_versioned (similar to build.sh)
49+
pipenv run mkdocs_versioned --default-branch="${LATEST_VERSION}"
50+
51+
# Copy issue report page into the built site root
52+
cp issue_report.php site/
3953
4054
- name: Create documentation archive
4155
run: |
@@ -47,3 +61,23 @@ jobs:
4761
name: csdocs
4862
path: ./csdocs.tar.gz
4963
if-no-files-found: error
64+
65+
- name: Publish
66+
uses: nogsantos/scp-deploy@master
67+
with:
68+
src: csdocs.tar.gz
69+
remote: /tmp/csdocs.tar.gz
70+
host: ${{ secrets.HOST_IP }}
71+
port: 22
72+
user: jelastic
73+
key: ${{ secrets.SSH_KEY }}
74+
75+
- name: Update
76+
uses: appleboy/ssh-action@v1.0.3
77+
with:
78+
host: ${{ secrets.HOST_IP }}
79+
username: jelastic
80+
key: ${{ secrets.SSH_KEY }}
81+
port: 22
82+
script: |
83+
rm -rf /tmp/public; mkdir -p /tmp/public; tar -xzf /tmp/csdocs.tar.gz -C /tmp/public/;

3rdparty/mkdocs/mkdocs/config/config_options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import unicode_literals
22

3-
from collections import Sequence
3+
from collections.abc import Sequence
44
import os
55
from collections import namedtuple
66

3rdparty/mkdocs/mkdocs/nav.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def _follow(config_line, url_context, config, header=None, title=None):
334334
header.children.append(page)
335335

336336
yield page
337-
raise StopIteration
337+
return
338338

339339
elif not isinstance(config_line, dict):
340340
msg = ("Line in 'page' config is of type {0}, dict or string "
@@ -347,15 +347,15 @@ def _follow(config_line, url_context, config, header=None, title=None):
347347
"config contains an invalid entry: {0}".format(config_line))
348348
elif len(config_line) == 0:
349349
log.warning("Ignoring empty line in the pages config.")
350-
raise StopIteration
350+
return
351351

352352
next_cat_or_title, subpages_or_path = next(iter(config_line.items()))
353353

354354
if isinstance(subpages_or_path, utils.string_types):
355355
path = subpages_or_path
356356
for sub in _follow(path, url_context, config, header=header, title=next_cat_or_title):
357357
yield sub
358-
raise StopIteration
358+
return
359359

360360
elif not isinstance(subpages_or_path, list):
361361
msg = ("Line in 'page' config is of type {0}, list or string "

plugins/markdown-tabs/markdown-tabs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
TABS_START_REGEX = re.compile(TABS_START)
1111
TABS_END_REGEX = re.compile(TABS_END)
1212

13+
1314
class TabsPreprocessor(Preprocessor):
1415
def run(self, lines):
1516
new_lines = []
@@ -37,6 +38,7 @@ def run(self, lines):
3738

3839
return new_lines
3940

41+
4042
class TabsExtension(Extension):
4143
def extendMarkdown(self, md, md_globals):
4244
md.registerExtension(self)

0 commit comments

Comments
 (0)