diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..b757d3d --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,49 @@ +name: website + +# build the documentation whenever there are new commits on main +on: + push: + branches: + - main + # Alternative: only build for tags. + # tags: + # - '*' + +# security: restrict permissions for CI jobs. +permissions: + contents: read + +jobs: + # Build the documentation and upload the static HTML files as an artifact. + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + + # ADJUST THIS: install all dependencies (including pdoc) + - run: pip install -e . + # ADJUST THIS: build your documentation into docs/. + # We use a custom build script for pdoc itself, ideally you just run `pdoc -o docs/ ...` here. + - run: python docs/make.py + + - uses: actions/upload-pages-artifact@v3 + with: + path: docs/ + + # Deploy the artifact to GitHub pages. + # This is a separate job so that only actions/deploy-pages has the necessary permissions. + deploy: + needs: build + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/README.md b/README.md index c78303c..d8461a4 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,5 @@ - -Table of Contents: _(Links to this page on GitHub)_ -1. [PYISO20022 - an ISO 20022 Message Generator and Parser](https://github.com/phoughton/pyiso20022/blob/main/README.md#pyiso20022-an-iso-20022-message-generator-and-parser) -1. [Parse an ISO 20022 PAIN.001 message](https://github.com/phoughton/pyiso20022/blob/main/README.md#parse-an-iso-20022-pain001-message) -1. [Create a ISO 20022 PAIN.001 message](https://github.com/phoughton/pyiso20022/blob/main/README.md#create-a-iso-20022-pain001-message) -1. [Create a ISO 20022 PACS.008 message](https://github.com/phoughton/pyiso20022/blob/main/README.md#create-a-iso-20022-pacs008-message) -1. [Convert a CAMT.053 into an Excel file](https://github.com/phoughton/pyiso20022/blob/main/README.md#convert-a-camt053-into-an-excel-file) - - # PYISO20022 an ISO 20022 Message Generator and Parser A package of classes to support payment, financial, securities & accounting message generation (for ISO 20022 messages). diff --git a/build_classes_from_xsds.bsh b/build_classes_from_xsds.bsh index 3da1144..30fe5bf 100755 --- a/build_classes_from_xsds.bsh +++ b/build_classes_from_xsds.bsh @@ -36,3 +36,8 @@ wait cat supported_msg_types.md | sort -n | uniq > supported_msg_types_final.md rm supported_msg_types.md +# Help pdoc with the docs +echo '"""' > pyiso20022/__init__.py +cat README.md >> pyiso20022/__init__.py +echo '"""' >> pyiso20022/__init__.py +