-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
From 0deaca31d9126be428e75f2992435dd564bd5e64 Mon Sep 17 00:00:00 2001 | ||
From: raldone01 <[email protected]> | ||
Date: Tue, 16 Jan 2024 06:14:59 +0100 | ||
Subject: [PATCH] fixes | ||
|
||
--- | ||
Dockerfile | 5 ++--- | ||
src/gdscript_docs_maker/gdscript_objects.py | 2 ++ | ||
2 files changed, 4 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/Dockerfile b/Dockerfile | ||
index 3cc6fbc..91562ea 100644 | ||
--- a/Dockerfile | ||
+++ b/Dockerfile | ||
@@ -1,10 +1,9 @@ | ||
-FROM docker.io/barichello/godot-ci:latest | ||
+FROM docker.io/barichello/godot-ci:4.1.3 | ||
|
||
+RUN apt update && apt -y install python3 python3-setuptools | ||
|
||
COPY . /app | ||
|
||
-RUN apt update && apt -y install python3 python3-setuptools | ||
- | ||
WORKDIR /app | ||
|
||
RUN python3 setup.py install | ||
diff --git a/src/gdscript_docs_maker/gdscript_objects.py b/src/gdscript_docs_maker/gdscript_objects.py | ||
index 827b110..bcf1e83 100644 | ||
--- a/src/gdscript_docs_maker/gdscript_objects.py | ||
+++ b/src/gdscript_docs_maker/gdscript_objects.py | ||
@@ -285,6 +285,8 @@ class GDScriptClass: | ||
# the extends_class field is a list in json even though it only has one | ||
# class. | ||
extends: str = data["extends_class"][0] if data["extends_class"] else "" | ||
+ if not ("description" in data): | ||
+ data["description"] = "" | ||
return GDScriptClass( | ||
data["name"], | ||
extends, | ||
-- | ||
2.43.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Generate and Deploy Documentation | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Clone gdscript-docs-maker | ||
run: | | ||
git clone https://github.com/GDQuest/gdscript-docs-maker.git | ||
cd gdscript-docs-maker | ||
git checkout 07cb0d8f0af6da745260d7bfabfc475504c413f1 | ||
git apply ../.github/workflows/gdscript_docs_maker.patch | ||
docker build -t gdscript-docs-maker . | ||
cd .. | ||
- name: Generate Documentation | ||
run: | | ||
docker run --rm -v ${{ github.workspace }}:/game -v ${{ github.workspace }}/docs/api-md:/output docker.io/library/gdscript-docs-maker /game -o /output | ||
- name: Fix permissions and create output directory | ||
run: | | ||
sudo chown -R $USER:$USER docs/ | ||
mkdir -p docs/api | ||
- name: Download CSS | ||
run: | | ||
curl -sL https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.5.0/github-markdown.min.css -o docs/api/github-markdown.min.css | ||
- uses: docker://pandoc/latex:2.9 | ||
with: | ||
args: >- # allows you to break string into multiple lines | ||
--from markdown | ||
--to html | ||
--standalone | ||
--css github-markdown.min.css | ||
--output=docs/api/index.tmp.html | ||
docs/api-md/logger.gd.md | ||
- name: Fix body class | ||
run: | | ||
sudo chown -R $USER:$USER docs/ | ||
sed 's/<body>/<body class="markdown-body">/g' docs/api/index.tmp.html > docs/api/index.html | ||
rm docs/api/index.tmp.html | ||
- name: Deploy Documentation | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs/api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
; Engine configuration file. | ||
; It's best edited using the editor UI and not directly, | ||
; since the parameters that go here are not all obvious. | ||
; | ||
; Format: | ||
; [section] ; section goes between [] | ||
; param=value ; assign values to parameters | ||
|
||
config_version=5 | ||
|
||
[application] | ||
|
||
config/name="gen_docs" | ||
config/description="gen" | ||
config/features=PackedStringArray("4.2", "Forward Plus") | ||
config/icon="res://assets/icons/plugin_icon_white.svg" | ||
|
||
[autoload] | ||
|
||
Log="*res://logger.gd" | ||
|
||
[dotnet] | ||
|
||
project/assembly_name="gen_docs" |