Skip to content

Commit

Permalink
Merge pull request #3 from Mahad-10/deploy-docs-to-s3
Browse files Browse the repository at this point in the history
Deploy docs to S3
  • Loading branch information
om26er authored May 30, 2024
2 parents 0a08e74 + f2f8f74 commit 37e0bc0
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 0 deletions.
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
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@ test:

run:
go run ./cmd/xconn

build-docs:
mkdir -p site/xconn/
mkdocs build -d site/xconn/go

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 Go.

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

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

```shell
go get github.com/xconnio/xconn-go/...
```
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-go
repo_name: xconnio/xconn-go
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-go

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>

0 comments on commit 37e0bc0

Please sign in to comment.