From 6be6ff97ac3b8a4f987f0eccf9c952b176f34aab Mon Sep 17 00:00:00 2001 From: Mahad Date: Thu, 30 May 2024 15:05:02 +0500 Subject: [PATCH 1/2] Deploy docs to S3 --- .github/workflows/upload.yaml | 32 +++++++++++++++++ Makefile | 9 +++++ docs/index.md | 7 ++++ docs/installation.md | 12 +++++++ mkdocs.yml | 67 +++++++++++++++++++++++++++++++++++ 5 files changed, 127 insertions(+) create mode 100644 .github/workflows/upload.yaml create mode 100644 Makefile create mode 100644 docs/index.md create mode 100644 docs/installation.md create mode 100644 mkdocs.yml diff --git a/.github/workflows/upload.yaml b/.github/workflows/upload.yaml new file mode 100644 index 0000000..60447cf --- /dev/null +++ b/.github/workflows/upload.yaml @@ -0,0 +1,32 @@ +name: Deploy docs + +on: + push: + branches: + - main + + paths: + - docs/** + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install mkdocs + run: pip install mkdocs-material[imaging] + + - name: Build Docs + run: make build-docs + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + + - name: Deploy static site to S3 bucket + run: aws s3 cp ./site/ s3://${{ secrets.AWS_BUCKET }} --recursive diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b32920d --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +build-docs: + mkdir -p site/xconn/ + mkdocs build -d site/xconn/dart + +run-docs: + mkdocs serve + +clean-docs: + rm -rf site/ diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..1beaad3 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,7 @@ +# Overview +WAMP v2 Client for Ruby. + +For full documentation visit [XConnIO](https://www.xconn.io). + +# Installation +For installation & usage [xconn-ruby](https://xconn.io/xconn/ruby/installation/). diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 0000000..ec25be5 --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,12 @@ +# Installation +Run this command: + +```shell +gem install xconn +``` + +Gemfile + +```ruby +gem 'xconn', '~> 0.0.1' +``` diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..db0427b --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,67 @@ +site_name: XConnIO +theme: + name: material + features: + - navigation.instant + - navigation.tracks + - navigation.sections + - toc.integrate + - navigation.top + - search.suggest + - search.highlight + - content.tabs.link + - content.code.annotation + - content.code.copy + language: en + palette: + # Palette toggle for automatic mode + - media: "(prefers-color-scheme)" + toggle: + icon: material/brightness-auto + name: Switch to light mode + + # Palette toggle for light mode + - media: "(prefers-color-scheme: light)" + scheme: default + toggle: + icon: material/brightness-7 + name: Switch to dark mode + + # Palette toggle for dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + toggle: + icon: material/brightness-4 + name: Switch to system preference + +repo_url: https://github.com/xconnio/xconn-ruby +repo_name: xconnio/xconn-ruby +site_author: omer +site_url: https://xconn.io +site_dir: site/docs + +plugins: + - social + - search + +extra: + social: + - icon: fontawesome/brands/github-alt + link: https://github.com/xconnio/xconn-ruby + +markdown_extensions: + - pymdownx.highlight: + anchor_linenums: true + - pymdownx.inlinehilite + - pymdownx.snippets + - admonition + - pymdownx.arithmatex: + generic: true + - footnotes + - pymdownx.details + - pymdownx.superfences + - pymdownx.mark + - attr_list + +copyright: | + © 2024 XConnIO From bb40ebc52b587e43ad090a2c8f1c39c3da53740f Mon Sep 17 00:00:00 2001 From: Mahad Date: Thu, 30 May 2024 15:29:24 +0500 Subject: [PATCH 2/2] fix documentation url in docs --- docs/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 1beaad3..bb76221 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,7 +1,7 @@ # Overview -WAMP v2 Client for Ruby. +WAMP v2 Client and Router for Ruby. -For full documentation visit [XConnIO](https://www.xconn.io). +For full documentation visit [XConnIO](https://xconn.io). # Installation For installation & usage [xconn-ruby](https://xconn.io/xconn/ruby/installation/).