-
Notifications
You must be signed in to change notification settings - Fork 9
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
18 changed files
with
1,250 additions
and
17 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,57 @@ | ||
name: PugSharp_website_build | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
tags: [ v**] | ||
paths: | ||
- 'Docs/**' | ||
- 'packaging/Docs/**' | ||
- '.github/workflows/website_build.yml' | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
- 'feature/**' | ||
tags: [ v**] | ||
paths: | ||
- 'Docs/**' | ||
- 'packaging/Docs/**' | ||
- '.github/workflows/website_build.yml' | ||
|
||
jobs: | ||
|
||
build_only: | ||
runs-on: ubuntu-latest | ||
if: ${{ ((!startsWith(github.ref, 'refs/tags/v')) && (!contains(github.event.head_commit.message, 'forcepublish')) && github.event_name == 'pull_request') || (((!startsWith(github.ref, 'refs/tags/v')) && (!contains(github.event.head_commit.message, 'forcepublish')) && github.event_name == 'push' )) }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: build | ||
run: docker run --rm -v ${{ github.workspace }}/Docs:/docs -e USERID=$(id -u ${USER}) -e GROUPID=$(id -g ${USER}) lan2play/docker-sphinxbuild:latest | ||
|
||
|
||
publish_prd: | ||
runs-on: ubuntu-latest | ||
if: ${{ (startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push') || (contains(github.event.head_commit.message, 'forcepublish') && github.event_name == 'push') }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: build | ||
run: docker run --rm -v ${{ github.workspace }}/Docs:/docs -e USERID=$(id -u ${USER}) -e GROUPID=$(id -g ${USER}) lan2play/docker-sphinxbuild:latest | ||
- name: Install SSH key | ||
uses: shimataro/ssh-key-action@v2 | ||
with: | ||
key: ${{ secrets.PUGSHARP_LAN2PLAY_DE_SSH }} | ||
name: id_rsa | ||
# config: ${{ secrets.SSH_CONFIG }} | ||
known_hosts: unnecessary | ||
if_key_exists: fail | ||
- name: git config | ||
run: git config --global user.email "[email protected]" && git config --global user.name "PugSharp CI" | ||
- name: clone pages repo | ||
run: git clone [email protected]:Lan2Play/pugsharp.lan2play.de.git | ||
- name: remove old things and add new | ||
run: rm -rf ./pugsharp.lan2play.de/docs/* && cp -rf ./Docs/build/html/* ./pugsharp.lan2play.de/docs/ | ||
- name: readd cname and nojekyll | ||
run: echo "pugsharp.lan2play.de" >> ./pugsharp.lan2play.de/docs/CNAME ; touch ./pugsharp.lan2play.de/docs/.nojekyll | ||
- name: push pages repo | ||
run: cd ./pugsharp.lan2play.de && if [ $(git status --short | wc -l) -gt 0 ]; then git add . && git commit -m "CI Build" && git push; fi |
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 |
---|---|---|
|
@@ -363,4 +363,7 @@ MigrationBackup/ | |
FodyWeavers.xsd | ||
|
||
|
||
!**/counterstrikesharp/**/* | ||
!**/counterstrikesharp/**/* | ||
|
||
|
||
Docs/build |
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,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
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,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=source | ||
set BUILDDIR=build | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.http://sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
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 @@ | ||
sphinx-rtd-theme |
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,26 @@ | ||
Admins quickstart guide | ||
================================================== | ||
|
||
Running PugSharp with docker | ||
------------------------------- | ||
|
||
Prerequisites | ||
^^^^^^^^^^^^^^^^^^^ | ||
- `CounterStrikeSharp by roflmuffin <https://github.com/roflmuffin/CounterStrikeSharp>`_ (currently no need to install seperatly, we package it with the releases until there is a steady release cycle available) | ||
- `MetaMod 2.0 <https://www.sourcemm.net/downloads.php?branch=dev>`_ | ||
- Linux Dedicated Server | ||
|
||
|
||
Installation | ||
^^^^^^^^^^^^^^^^^^^ | ||
|
||
- Install `MetaMod 2.0 <https://www.sourcemm.net/downloads.php?branch=dev>`_ on your Linux Dedicated Server | ||
- Download one of our releases including `CounterStrikeSharp by roflmuffin <https://github.com/roflmuffin/CounterStrikeSharp>`_ and the Dotnet Runtime and unpack it to your csgo folder. Currently you can find really early alpha releases on our `Github Actions <https://github.com/Lan2Play/PugSharp/actions>`_ as Artifacts. | ||
- Have fun and report bugs :D | ||
|
||
Notes | ||
^^^^^^^^^^^^^^^^^^^ | ||
|
||
.. warning:: | ||
This Plugin is in a very early state of development and is not fully working right now! We keep you updated on our discord (you can find it on the home of the docs), if you are interested in using it. | ||
|
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,75 @@ | ||
#import guzzle_sphinx_theme | ||
import sphinx_rtd_theme | ||
|
||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# This file only contains a selection of the most common options. For a full | ||
# list see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Path setup -------------------------------------------------------------- | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
# | ||
# import os | ||
# import sys | ||
# sys.path.insert(0, os.path.abspath('.')) | ||
|
||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = 'PugSharp' | ||
copyright = 'Lan2Play Team' | ||
author = 'Lan2Play Team' | ||
|
||
# The full version, including alpha/beta/rc tags | ||
release = '2.0' | ||
|
||
|
||
# -- General configuration --------------------------------------------------- | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = [ | ||
"sphinx.ext.autosectionlabel", | ||
] | ||
|
||
# Make sure the target is unique | ||
autosectionlabel_prefix_document = True | ||
#extensions.append("guzzle_sphinx_theme") | ||
extensions.append("sphinx_rtd_theme") | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ['_templates'] | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This pattern also affects html_static_path and html_extra_path. | ||
exclude_patterns = [] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
# | ||
#html_theme = 'alabaster' | ||
|
||
#html_theme_path = guzzle_sphinx_theme.html_theme_path() | ||
#html_theme = 'guzzle_sphinx_theme' | ||
|
||
html_theme = "sphinx_rtd_theme" | ||
|
||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
# html_static_path = ['_static'] | ||
|
||
#html_theme_options = { | ||
# "project_nav_name": "PugSharp", | ||
# "globaltoc_depth": 3, | ||
#} |
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,106 @@ | ||
|
||
Contribution Guide | ||
================================================== | ||
|
||
We are looking forward to every conbtirbution you possibly can bring in. If you want to contribute please read this document carefully. | ||
|
||
If you encounter serious errors while using PugSharp and you are not able to fix them, feel free to open issues on https://github.com/Lan2Play/PugSharp/issues . | ||
|
||
If you plan to add a feature to PugSharp, please open an issue as well and draft a pull request as soon as you have done something, so no one has to do work that someone already did. | ||
|
||
You can also join our discord to get in contact with us and the other contributors: | ||
|
||
.. image:: https://discordapp.com/api/guilds/748086853449810013/widget.png?style=banner3 | ||
:target: https://discord.gg/zF5C9WPWFq | ||
|
||
|
||
Documentation | ||
-------------- | ||
This documentation is written in restructured text and its build using sphinx and the read the docs theme. The source can be found in our main repository in the ``Docs/`` subfolder (https://github.com/Lan2Play/PugSharp/tree/main/Docs). | ||
Feel free to pull request corrections or expansions of the documentation at any time! | ||
|
||
To build the documentation locally to the ``Docs/build`` subfolder you have two options: | ||
|
||
- Building with docker and the make file (recommended) | ||
- Building manually with the sphinx make file | ||
|
||
Building with docker and the make file | ||
....................................... | ||
|
||
Windows | ||
''''''' | ||
Prerequisites: | ||
|
||
- Docker for Windows with wsl2 backend (https://docs.docker.com/docker-for-windows/wsl/ Follow the prerequisites, the download and the install part!) | ||
|
||
|
||
.. warning:: | ||
|
||
If you are using git, consider cloning the repository within your wsl distro instead of with git for windows to get around line ending problems! | ||
|
||
To build the documentation just enter yor wsl2 distribution and follow the linux part below! | ||
|
||
|
||
Linux | ||
''''''' | ||
Prerequisites: | ||
|
||
- Docker (https://docs.docker.com/engine/install) | ||
- Make (should be available for nearly every linux distro in the corresponding packagemanager) | ||
|
||
In order to build the documentation you have to change to the root folder of the repository and run | ||
|
||
.. code-block:: bash | ||
make docs-html | ||
Building manually with the sphinx make file | ||
............................................ | ||
|
||
Windows | ||
''''''' | ||
Prerequisites: | ||
|
||
- python 3 (https://docs.python.org/3/using/index.html) with pip | ||
- sphinx (https://www.sphinx-doc.org/en/master/usage/installation.html) | ||
- the read the docs theme (https://github.com/readthedocs/sphinx_rtd_theme#installation) | ||
|
||
open a cmd or powershell and change your folder to the ``Docs/`` subfolder and run | ||
|
||
CMD | ||
|
||
.. code-block:: batch | ||
make.bat html | ||
Psh | ||
|
||
.. code-block:: powershell | ||
./make.bat html | ||
Linux | ||
''''''' | ||
Prerequisites: | ||
|
||
- python 3 (https://docs.python.org/3/using/index.html) with pip | ||
- sphinx (https://www.sphinx-doc.org/en/master/usage/installation.html) | ||
- the read the docs theme (https://github.com/readthedocs/sphinx_rtd_theme#installation) | ||
- Make (should be available for nearly every linux distro in the corresponding packagemanager) | ||
|
||
open your favorite shell and change your folder to the ``Docs/`` subfolder and run | ||
|
||
.. code-block:: bash | ||
make html | ||
Translation / i18n | ||
------------------- | ||
If you want to help with the translation of PugSharp, please check out our :doc:`/develop/translation` section | ||
|
||
|
||
Code | ||
----- | ||
If you want to get into coding for PugSharp, check out the :doc:`/develop/quickstart`, there you can find an introduction into how to setup your development environment, how the contribution process looks like and some specific parts of PugSharp where we would love to see adaption for more usecases. |
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,4 @@ | ||
CI / CD | ||
================================================== | ||
|
||
There is no released version so far. Stay tuned! |
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,4 @@ | ||
Folder structure | ||
================================================== | ||
|
||
To be done. |
Oops, something went wrong.