Skip to content
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

Deploy docs to S3 #15

Merged
merged 2 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/upload.yaml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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/
7 changes: 7 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Overview
WAMP v2 Client and Router for Ruby.

For full documentation visit [XConnIO](https://xconn.io).

# Installation
For installation & usage [xconn-ruby](https://xconn.io/xconn/ruby/installation/).
12 changes: 12 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Installation
Run this command:

```shell
gem install xconn
```

Gemfile

```ruby
gem 'xconn', '~> 0.0.1'
```
67 changes: 67 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -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: |
&copy; 2024 <a href="https://github.com/xconnio/" target="_blank" rel="noopener">XConnIO</a>