diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..8214118c --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,53 @@ +name: ๐Ÿ“š Generate Documentation + +on: + pull_request: + branches: ["main"] + push: + branches: [ main ] + paths: + - 'mcpgateway/**' + - 'docs/**' + - 'README.md' + - 'mkdocs.yml' + workflow_dispatch: + +jobs: + docs: + runs-on: ubuntu-latest + permissions: + contents: write + pages: write + id-token: write + + steps: + - name: ๐Ÿ“ฆ Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y graphviz + + - name: ๐Ÿ“š Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install code2flow snakefood3 pylint handsdown mkdocs mkdocs-material pytest + + - name: ๐Ÿงช Run tests for reports + run: make -f ./Makefile test + + - name: ๐Ÿ“ Generate documentation + run: make docs + + - name: ๐Ÿš€ Setup Pages + uses: actions/configure-pages@v4 + + - name: ๐Ÿ“‹ Build with MkDocs + run: mkdocs build + + - name: ๐Ÿ“ค Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: './site' + + # - name: ๐ŸŒ Deploy to GitHub Pages + # id: deployment + # uses: actions/deploy-pages@v2