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

doc: major documentation refactoring, update github actions #2

Merged
merged 3 commits into from
Nov 1, 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
38 changes: 38 additions & 0 deletions .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build Sphinx Doc

on:
pull_request:

jobs:
build-doc:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Install Packages
run: |
sudo apt-get update
sudo apt-get install plantuml tox python3-pip -y

- name: Build static site with Tox
run: |
cd doc
tox -e py3-html

- name: Deploy Preview
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: doc/build/html
destination_dir: 'previews/${{ github.event.number }}'

- name: Create status check with preview link
run: |
PREVIEW_URL="https://flownexus-lwm2m.github.io/waterlevel_monitor/previews/${{ github.event.number }}"
PAYLOAD=$(echo '{}' | jq --arg name 'Documentation Preview' --arg url "${PREVIEW_URL}" '{"name": $name, "head_sha": "${{ github.event.pull_request.head.sha }}", "details_url": $url, "status": "completed", "conclusion": "success", "output": {"title": $name, "summary": "Preview available at", "text": $url}}')
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/json" \
-X POST -d "${PAYLOAD}" \
"https://api.github.com/repos/${{ github.repository }}/check-runs"
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build and Deploy Sphinx Doc

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Install Packages
run: |
sudo apt-get update
sudo apt-get install plantuml toxpython3-pip -y

- name: Build static site with Tox
run: |
cd doc
tox -e py3-html

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: doc/build/html
4 changes: 2 additions & 2 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Sphinx==7.2.6
sphinx-rtd-theme==2.0.0
Sphinx==8.1.3
sphinx-book-theme==1.1.3
sphinxcontrib-plantuml
codespell
12 changes: 12 additions & 0 deletions doc/source/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.highlight .gp {
color: #ffa200;
font-weight: bold;
}

/* Fixes miscalculationg about the margin, which causes a scrollbar between
* the primary sidebar and the content
*/
#rtd-footer-container {
margin-top: 0px !important;
margin-bottom: 0px !important;
}
65 changes: 65 additions & 0 deletions doc/source/_static/flownexus_favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
112 changes: 112 additions & 0 deletions doc/source/_static/flownexus_logo_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading