-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish docs to GH pages #20
Changes from all commits
f20e8a9
fa1c5e5
624f63e
5464a4a
f80d011
f0007f2
ff28058
d1a501d
729421f
1bf9397
001626c
bdad271
f3b20ef
5ec8fa4
15fb46a
ef083ae
678073d
fe905a4
9222e8c
323290b
ec55a7d
70f6083
9d12020
b097f82
8f5395c
9991763
c732367
f93d365
af9d5b0
1ce1d7c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build and deploy sphinx docs | ||
|
||
on: | ||
push: | ||
branches: main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r requirements-dev.txt | ||
- name: Build documentation | ||
run: | | ||
cd docs/ | ||
make html | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
ref: "gh-pages" | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
path: "gh-pages-docs" | ||
|
||
- name: Deploy to GitHub Pages | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
rm -rf ./gh-pages-docs/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So delete & re-add files. Sounds good. |
||
mv -f ${{ github.workspace }}/docs/_build/html/* ./gh-pages-docs | ||
cd ./gh-pages-docs | ||
touch .nojekyll | ||
git add . | ||
git commit -m "Deploy documentation from GitHub Actions" --allow-empty | ||
git push origin gh-pages |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,3 +139,5 @@ typings/** | |
!libbls.dll | ||
|
||
examples/output | ||
|
||
./docs/_build/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed, it's OK to keep the RST files, but exclude the built site 👍 |
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 = . | ||
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) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# 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 | ||
|
||
import os | ||
import sys | ||
|
||
sys.path.insert(0, os.path.abspath("..")) | ||
|
||
project = 'multiversx-sdk' | ||
copyright = '2024, MultiversX' | ||
author = 'MultiversX' | ||
release = '0.9.0' | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = ["sphinx.ext.todo", "sphinx.ext.viewcode", "sphinx.ext.autodoc"] | ||
|
||
templates_path = ['_templates'] | ||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
|
||
|
||
# -- 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'] | ||
autoclass_content = 'both' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.. multiversx-sdk documentation master file, created by | ||
sphinx-quickstart on Wed Apr 3 14:19:32 2024. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
|
||
Welcome to multiversx-sdk's documentation! | ||
========================================== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
modules | ||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. :windows: 🙈 But it's OK, we can keep it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. well, it's generated :) |
||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=. | ||
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
multiversx_sdk | ||
============== | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
multiversx_sdk |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
multiversx\_sdk.core.adapters package | ||
===================================== | ||
|
||
Submodules | ||
---------- | ||
|
||
multiversx\_sdk.core.adapters.query\_runner\_adapter module | ||
----------------------------------------------------------- | ||
|
||
.. automodule:: multiversx_sdk.core.adapters.query_runner_adapter | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: multiversx_sdk.core.adapters | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
multiversx\_sdk.core.proto package | ||
================================== | ||
|
||
Submodules | ||
---------- | ||
|
||
multiversx\_sdk.core.proto.transaction\_pb2 module | ||
-------------------------------------------------- | ||
|
||
.. automodule:: multiversx_sdk.core.proto.transaction_pb2 | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
multiversx\_sdk.core.proto.transaction\_serializer module | ||
--------------------------------------------------------- | ||
|
||
.. automodule:: multiversx_sdk.core.proto.transaction_serializer | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: multiversx_sdk.core.proto | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe drop this trigger? Or should we keep it for some time? OK to keep it for a few days / weeks, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove it in the next PR. I was thinking that maybe we want to check the docs if anyone changes it, but I guess we can do that locally, as well.