Skip to content

Commit

Permalink
Merge pull request #33 from xconnio/deploy-docs-to-s3
Browse files Browse the repository at this point in the history
Deploy docs to S3
  • Loading branch information
Mahad-10 authored May 30, 2024
2 parents f92c9c7 + 3c660fa commit 4dd5746
Show file tree
Hide file tree
Showing 5 changed files with 149 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 @@ -21,3 +21,13 @@ run:

build:
dart compile exe lib/src/xconn.dart -o xconn.bin

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 for Dart.

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

# Installation
For installation & usage [xconn-dart](https://xconn.io/xconn/dart/)
33 changes: 33 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Installation
Use this package as a library

Depend on it.

Run this command:

**With Dart**

```shell
dart pub add xconn
```

**With Flutter**

```shell
flutter pub add xconn
```
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

```yaml
dependencies:
xconn: ^0.1.0
```
Alternatively, your editor might support `dart pub get` or `flutter pub get`. Check the docs for your editor to learn more.

Import it
Now in your Dart code, you can use:

```dart
import 'package:xconn/exports.dart';
```
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-dart
repo_name: xconnio/xconn-dart
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-dart

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 4dd5746

Please sign in to comment.