diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml new file mode 100644 index 0000000..fca63f3 --- /dev/null +++ b/.github/workflows/documentation.yaml @@ -0,0 +1,24 @@ +name: Build +on: [push, pull_request, workflow_dispatch] +permissions: + contents: write +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - name: Install dependencies + run: | + pip install -r requirements.txt + - name: Sphinx build + run: | + sphinx-build doc _build + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + with: + publish_branch: gh-pages + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: _build/ + force_orphan: true \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/Makefile @@ -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) diff --git a/README.md b/README.md index 00cef14..b64da70 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -# green-courses \ No newline at end of file +# Учебные материалы от Scientific Programming Centre + +[Смотреть здесь](https://.github.io/green-courses/ ) \ No newline at end of file diff --git a/make.bat b/make.bat new file mode 100644 index 0000000..dc1312a --- /dev/null +++ b/make.bat @@ -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 + +%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.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..0d0e602 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +sphinx +sphinx_rtd_theme +myst-parser \ No newline at end of file diff --git a/source/advanced_python.md b/source/advanced_python.md new file mode 100644 index 0000000..4e76d2d --- /dev/null +++ b/source/advanced_python.md @@ -0,0 +1 @@ +# Продвинутое программирование на Python \ No newline at end of file diff --git a/source/beginner_python.md b/source/beginner_python.md new file mode 100644 index 0000000..aa526e6 --- /dev/null +++ b/source/beginner_python.md @@ -0,0 +1 @@ +# Начала программирования на Python \ No newline at end of file diff --git a/source/conf.py b/source/conf.py new file mode 100644 index 0000000..da4626c --- /dev/null +++ b/source/conf.py @@ -0,0 +1,37 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = 'SPC software courses' +copyright = '2023, Mikhail Zelenyi et al.' +author = 'Mikhail Zelenyi et al.' +release = '2023.09' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [ + 'sphinx_rtd_theme', + 'myst_parser' +] + +templates_path = ['_templates'] +exclude_patterns = [] + +language = 'ru' + +source_suffix = { + '.rst': 'restructuredtext', + '.txt': 'markdown', + '.md': 'markdown', +} + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = "sphinx_rtd_theme" +html_static_path = ['_static'] diff --git a/source/index.rst b/source/index.rst new file mode 100644 index 0000000..a32f308 --- /dev/null +++ b/source/index.rst @@ -0,0 +1,18 @@ +Учебные материалы от Scientific Programming Centre +================================================== + +.. toctree:: + :maxdepth: 1 + :caption: Список материалов: + + laboratory_python.md + beginner_python.md + advanced_python.md + + +.. Indices and tables +.. ================== + +.. * :ref:`genindex` +.. * :ref:`modindex` +.. * :ref:`search` diff --git a/source/laboratory_python.md b/source/laboratory_python.md new file mode 100644 index 0000000..072c5ba --- /dev/null +++ b/source/laboratory_python.md @@ -0,0 +1 @@ +# Использование Python в лабораторном практикуме \ No newline at end of file