Skip to content

Commit 792f05a

Browse files
committed
updating 5.5 for gh-pages
1 parent e0b41a4 commit 792f05a

File tree

3 files changed

+95
-31
lines changed

3 files changed

+95
-31
lines changed

.github/workflows/deploy-documents.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env:
99
on:
1010
push:
1111
branches:
12-
# Branch to base "dev" website on. Set in siteversion.py also.
12+
# Branch to base "dev" website on.
1313
- master
1414
# Release branches have names like 0.8.x, 0.9.x, ...
1515
- "[0-9]+.[0-9]+.x"
@@ -60,34 +60,49 @@ jobs:
6060
wget -O overrides/fanart.md \
6161
https://raw.githubusercontent.com/phalcon/assets/master/phalcon/fanart-fragment.html
6262
63+
- name: Update NFR list
64+
run: |
65+
python ./update-nfr.py
66+
6367
- name: Determine versioning parameters
6468
id: determine-versioning
6569
run: |
6670
# Read the first line from the VERSION file
6771
LINE=$(head -n 1 ./VERSION)
68-
72+
6973
# Extract version and alias using parameter expansion
7074
VERSION="${LINE%%|*}"
7175
ALIAS="${LINE#*|}"
72-
76+
7377
# Print the extracted values for verification
7478
echo "Version: $VERSION"
7579
echo "Alias: $ALIAS"
76-
80+
7781
echo "PH_DOCS_VERSION=$VERSION" >> $GITHUB_ENV
7882
echo "PH_DOCS_ALIAS=$ALIAS" >> $GITHUB_ENV
7983
8084
- name: Deploy
8185
if: ${{ env.PH_DOCS_VERSION }} != null
8286
run: |
83-
# Publishing implies creating a git commit on the production branch,
87+
# Publishing implies creating a git commit on the production branch,
8488
# We will need to create a user for this at some point
89+
echo "Deploying with Mike"
8590
git config user.name niden
8691
git config user.email [email protected]
87-
git fetch --no-tags --prune --depth=1 origin +refs/heads/production:refs/remotes/origin/production
92+
git fetch --no-tags --prune --depth=1 origin +refs/heads/gh-pages:refs/remotes/origin/gh-pages
8893
mike deploy \
8994
--update-aliases \
90-
--branch production \
95+
--alias-type=redirect \
9196
--push \
9297
${{ env.PH_DOCS_VERSION }} \
9398
${{ env.PH_DOCS_ALIAS }}
99+
echo "Deployed"
100+
101+
# git fetch --no-tags --prune --depth=1 origin +refs/heads/production:refs/remotes/origin/production
102+
# mike deploy \
103+
# --update-aliases \
104+
# --alias-type=redirect \
105+
## --branch production \
106+
# --push \
107+
# ${{ env.PH_DOCS_VERSION }} \
108+
# ${{ env.PH_DOCS_ALIAS }}

mkdocs.yml

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ plugins:
220220
# Additional configuration
221221
extra:
222222
version:
223-
default: 5.4.0
224223
provider: mike
225224
analytics:
226225
provider: google
@@ -295,31 +294,31 @@ nav:
295294
- Home:
296295
- Introduction: introduction.md
297296
- Changelog:
298-
- Current Version: https://github.com/phalcon/cphalcon/blob/5.0.x/CHANGELOG-5.0.md
299-
- Releases: releases.md
300-
- How to upgrade: upgrade.md
297+
- Current Version: https://github.com/phalcon/cphalcon/blob/5.0.x/CHANGELOG-5.0.md
298+
- Releases: releases.md
299+
- How to upgrade: upgrade.md
301300
- Contributing:
302-
- Contributions: contributions.md
303-
- Asking a question: https://phalcon.io/discussions
304-
- Requesting a change: new-feature-request.md
305-
- Issuing a Pull Request: new-pull-request.md
301+
- Contributions: contributions.md
302+
- Asking a question: https://phalcon.io/discussions
303+
- Requesting a change: new-feature-request.md
304+
- Issuing a Pull Request: new-pull-request.md
306305
- Guides:
307-
- Backtrace Generation: generating-backtrace.md
308-
- Reproducible Tests: reproducible-tests.md
309-
- Testing environment: testing-environment.md
310-
- Coding Standard: coding-standard.md
306+
- Backtrace Generation: generating-backtrace.md
307+
- Reproducible Tests: reproducible-tests.md
308+
- Testing environment: testing-environment.md
309+
- Coding Standard: coding-standard.md
311310
- Sponsoring: sponsors.md
312311
- Getting Started:
313312
- Installation: installation.md
314313
- Webserver Setup: webserver-setup.md
315314
- Environments:
316-
- Devilbox: environments-devilbox.md
317-
- Nanobox: environments-nanobox.md
315+
- Devilbox: environments-devilbox.md
316+
- Nanobox: environments-nanobox.md
318317
- Development Tools:
319-
- Devtools: devtools.md
320-
- Debug: support-debug.md
321-
- Migrations: db-migrations.md
322-
- Unit Testing: unit-testing.md
318+
- Devtools: devtools.md
319+
- Debug: support-debug.md
320+
- Migrations: db-migrations.md
321+
- Unit Testing: unit-testing.md
323322
- Tutorials:
324323
- Basic: tutorial-basic.md
325324
- Invo: tutorial-invo.md
@@ -355,11 +354,11 @@ nav:
355354
- Forms: forms.md
356355
- Image: image.md
357356
- HTML:
358-
- Attributes: html-attributes.md
359-
- Breadcrumbs: html-breadcrumbs.md
360-
- Escaper: html-escaper.md
361-
- Link: html-link.md
362-
- Tag Factory: html-tagfactory.md
357+
- Attributes: html-attributes.md
358+
- Breadcrumbs: html-breadcrumbs.md
359+
- Escaper: html-escaper.md
360+
- Link: html-link.md
361+
- Tag Factory: html-tagfactory.md
363362
- Tag (legacy): tag.md
364363
- View: views.md
365364
- Volt: volt.md
@@ -381,7 +380,7 @@ nav:
381380
- Loader: autoload.md
382381
- Logger: logger.md
383382
- HTTP:
384-
- Cookies: response/#cookies
383+
- Cookies: response#cookies
385384
- Request: request.md
386385
- Response: response.md
387386
- i18n:

update-nfr.py

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import requests
2+
import json
3+
4+
print("Getting NFR Reactions")
5+
6+
comments = 'https://api.github.com/repos/phalcon/cphalcon/issues/14608/comments?page='
7+
result = {}
8+
for i in range(1, 10):
9+
url = f"{comments}{i}"
10+
headers = {
11+
'Accept': 'application/vnd.github.squirrel-girl-preview+json',
12+
'User-Agent': 'Phalcon Agent'
13+
}
14+
15+
response = requests.get(url, headers=headers)
16+
content = response.text
17+
18+
print(f"Got content {i}")
19+
data = json.loads(content)
20+
21+
for comment in data:
22+
id = comment.get('id', '')
23+
url = comment.get('html_url', '')
24+
body = comment.get('body', '')
25+
reactions = comment.get('reactions', {})
26+
plusone = reactions.get('+1', 0)
27+
28+
body = body.split('\n')[0].replace('\r', '').replace('\r\n', '')
29+
plusone = f"{int(plusone):03}"
30+
result[f"{plusone}-{id}"] = {
31+
'reaction': plusone,
32+
'body': f"[{body}]({url})"
33+
}
34+
35+
print("Sorting Results")
36+
sorted_result = dict(sorted(result.items(), key=lambda item: item[0], reverse=True))
37+
38+
print("Creating Content")
39+
output = "# New Feature Request List\n"
40+
output += "- - -\n\n"
41+
output += "| Votes | Description |\n"
42+
output += "|--------|-------------------------|\n"
43+
for item in sorted_result.values():
44+
output += f"| {item['reaction']} | {item['body']} |\n"
45+
46+
output += "\n"
47+
48+
file_name = 'docs/new-feature-request-list.md'
49+
with open(file_name, 'w') as file:
50+
file.write(output)

0 commit comments

Comments
 (0)