Skip to content

Commit

Permalink
I want die.
Browse files Browse the repository at this point in the history
  • Loading branch information
raldone01 committed Jan 16, 2024
1 parent 068e1ef commit c689b8c
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/gdscript_docs_maker.patch
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

59 changes: 59 additions & 0 deletions .github/workflows/generate_docs.yml
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# gdlogging Godot addon

![Doc Gen Badge](https://github.com/raldone01/godot_addon_gdlogging/actions/workflows/generate_docs.yml/badge.svg)

[Documentation](https://raldone01.github.io/godot_addon_gdlogging/)

This is a composable logging addon for version 4 of the [Godot game engine](https://godotengine.org/).

## Usage
Expand Down
24 changes: 24 additions & 0 deletions project.godot
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"

0 comments on commit c689b8c

Please sign in to comment.