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

[RTC-382] Add docs versioning #17

Merged
merged 5 commits into from
Nov 17, 2023
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
36 changes: 0 additions & 36 deletions .github/workflows/docs.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/main_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on:
push:
branches:
- main

jobs:
# Build the documentation and upload the static HTML files as an artifact.
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- uses: abatilo/actions-poetry@v2
- run: poetry install
- run: poetry run generate_docs
- run: git fetch origin gh-pages --depth=1
- run: git config user.name ci-bot
- run: git config user.email [email protected]
- run: poetry run mike deploy latest
- run: git checkout gh-pages

# Push changes to gh-pages branch
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
32 changes: 32 additions & 0 deletions .github/workflows/tag_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: docs

on:
push:
tags:
- "v*.*.*"

jobs:
# Build the documentation and upload the static HTML files as an artifact.
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- uses: abatilo/actions-poetry@v2
- run: poetry install
- run: poetry run generate_docs
- run: git fetch origin gh-pages --depth=1
- run: git config user.name ci-bot
- run: git config user.email [email protected]
- run: poetry run mike deploy ${{github.ref_name}}
- run: poetry run mike set-default ${{github.ref_name}}
- run: git checkout gh-pages

# Push changes to gh-pages branch
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
docs/api

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
34 changes: 34 additions & 0 deletions docs/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.container-fluid .row .col-md-3 {
display: none;
}

.container .row .col-md-3 {
display: none;
}

.container-fluid .row .col-md-12 {
padding-left: 0px !important;
padding-right: 0px !important;
}

.container-fluid .row .col-md-9 {
padding-left: 0px !important;
padding-right: 0px !important;
}

#navbar-collapse {
display: none !important;
}

.navbar-toggler {
display: none !important;
}

.container-fluid .row {
padding-top: 56px;
}

.navbar {
position: fixed !important;
top: 0
}
11 changes: 11 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!doctype html>
<html>

<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=./api/jellyfish.html" />
</head>

<link href="jellyfish.html" rel="import" />

</html>
11 changes: 11 additions & 0 deletions docs/js/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
let elements = document.querySelectorAll('.container .row .col-md-9');

for (let i = 0; i < elements.length; i++) {
elements[i].classList.replace("col-md-9", "col-md-12")
}

elements = document.querySelectorAll('.container');
for (let i = 0; i < elements.length; i++) {
console.log("CONTIANER", elements[i])
elements[i].classList.replace("container", "container-fluid")
}
24 changes: 24 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
site_name: Jellyfish Python Server SDK
use_directory_urls: false
# theme: simple-blog

plugins:
- mike:
# These fields are all optional; the defaults are as below...
alias_type: symlink
redirect_template: null
deploy_prefix: ''
canonical_version: null
version_selector: true
css_dir: css
javascript_dir: js

theme:
name: mkdocs
navigation_depth: 0

extra_javascript:
- js/custom.js

extra_css:
- css/custom.css
6 changes: 0 additions & 6 deletions pdoc.sh

This file was deleted.

Loading