diff --git a/.github/workflows/upload-docs.yml b/.github/workflows/upload-docs.yml new file mode 100644 index 0000000000..ef103867ee --- /dev/null +++ b/.github/workflows/upload-docs.yml @@ -0,0 +1,25 @@ +name: Build and upload API docs + +on: + push: + branches: [develop, staging] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build python docs + run: | + cd bindings/python + pip install -r requirements-dev.txt + PYTHONPATH=. pydoc-markdown + cd - + - name: Build nodejs docs + run: | + cd bindings/nodejs + # The SDK still uses yarn classic: https://github.com/iotaledger/iota-sdk/issues/433 + yarn set version classic + yarn + yarn create-api-docs --out ../../docs/references/nodejs + cd - \ No newline at end of file diff --git a/.gitignore b/.gitignore index 5fa9b9b946..3bc0e5a494 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,6 @@ address.json .DS_Store book .venv* + +# Temporary documentation +/docs diff --git a/bindings/python/pydoc-markdown.yml b/bindings/python/pydoc-markdown.yml index a68672a764..0b3ed48b6a 100644 --- a/bindings/python/pydoc-markdown.yml +++ b/bindings/python/pydoc-markdown.yml @@ -8,7 +8,7 @@ processors: - type: crossref renderer: type: docusaurus - docs_base_path: ./docs/ + docs_base_path: ../../docs/ relative_output_path: references/python markdown: