-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GH Action] Release page as external sphinx Project (#1965)
- Created Sphinx Project that builds the release page (Release list and individual Download Pages) independent from the eCAL Documentation - The files are now generated with Jinja2 (not empy anymore) - The Release Page is not linked anywhere, yet - The GH Action uploads the release page as .zip file (always) and publishes it to GH Pages (for master builds only)
- Loading branch information
1 parent
d453403
commit db85761
Showing
16 changed files
with
2,185 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Documentation Release Page | ||
|
||
on: | ||
push: | ||
|
||
release: | ||
types: | ||
- released | ||
- unpublished | ||
- deleted | ||
|
||
jobs: | ||
documentation-release-page: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Get current branch name | ||
id: branch | ||
run: | | ||
# Get the branch name | ||
branch=$(echo ${GITHUB_REF#refs/heads/}) | ||
# only publish documentation for master branch | ||
if [[ $branch == master ]]; then | ||
echo "publish_doc=true" >> $GITHUB_ENV | ||
else | ||
echo "publish_doc=false" >> $GITHUB_ENV | ||
fi | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'false' | ||
fetch-depth: 0 | ||
|
||
|
||
- name: Install Python | ||
run: | | ||
sudo apt update | ||
sudo apt-get -y install python3-dev python3-venv | ||
- name: Install Python dependencies | ||
run: | | ||
mkdir ".venv" | ||
python3 -m venv ".venv" | ||
source ".venv/bin/activate" | ||
pip install --upgrade pip | ||
pip install -r "$GITHUB_WORKSPACE/doc/requirements.txt" | ||
- name: Build Release page with Sphinx | ||
env: | ||
ECAL_GH_API_KEY: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
source ".venv/bin/activate" | ||
sphinx-build -b html doc/release_page build/html | ||
- name: Zip Release Page | ||
run: | | ||
cd build/html | ||
zip -r ../release-page.zip . | ||
- name: Upload documentation | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: release-page | ||
path: build/release-page.zip | ||
|
||
- name: Deploy Release Page | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
publish_branch: gh-pages | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: build/html | ||
destination_dir: releases | ||
if: env.publish_doc == 'true' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
.bignums, | ||
.bignums-hint, | ||
.bignums-note, | ||
.bignums-caution, | ||
.bignums-warning, | ||
.bignums-attention, | ||
.bignums-important, | ||
.bignums-seealso, | ||
.bignums-tip, | ||
.bignums-danger, | ||
.bignums-error, | ||
.bignums-xxl { | ||
padding: 0; | ||
counter-reset: li-counter | ||
} | ||
|
||
.bignums>li, | ||
.bignums-hint>li, | ||
.bignums-note>li, | ||
.bignums-caution>li, | ||
.bignums-warning>li, | ||
.bignums-attention>li, | ||
.bignums-important>li, | ||
.bignums-seealso>li, | ||
.bignums-tip>li, | ||
.bignums-danger>li, | ||
.bignums-error>li, | ||
.bignums-xxl>li { | ||
list-style: none; | ||
position: relative; | ||
padding: 1rem; | ||
padding-left: 3.875rem; | ||
padding-top: 1.2875rem; | ||
background-color: #e6e6e6; | ||
min-height: 4.3rem; | ||
border-radius: .25rem | ||
} | ||
|
||
.bignums>li>.first, | ||
.bignums-hint>li>.first, | ||
.bignums-note>li>.first, | ||
.bignums-caution>li>.first, | ||
.bignums-warning>li>.first, | ||
.bignums-attention>li>.first, | ||
.bignums-important>li>.first, | ||
.bignums-seealso>li>.first, | ||
.bignums-tip>li>.first, | ||
.bignums-danger>li>.first, | ||
.bignums-error>li>.first, | ||
.bignums-xxl>li>.first { | ||
font-weight: 600; | ||
font-size: 1.15rem | ||
} | ||
|
||
.bignums>li *:last-child, | ||
.bignums-hint>li *:last-child, | ||
.bignums-note>li *:last-child, | ||
.bignums-caution>li *:last-child, | ||
.bignums-warning>li *:last-child, | ||
.bignums-attention>li *:last-child, | ||
.bignums-important>li *:last-child, | ||
.bignums-seealso>li *:last-child, | ||
.bignums-tip>li *:last-child, | ||
.bignums-danger>li *:last-child, | ||
.bignums-error>li *:last-child, | ||
.bignums-xxl>li *:last-child { | ||
margin-bottom: 0 | ||
} | ||
|
||
.bignums>li:before, | ||
.bignums-hint>li:before, | ||
.bignums-note>li:before, | ||
.bignums-caution>li:before, | ||
.bignums-warning>li:before, | ||
.bignums-attention>li:before, | ||
.bignums-important>li:before, | ||
.bignums-seealso>li:before, | ||
.bignums-tip>li:before, | ||
.bignums-danger>li:before, | ||
.bignums-error>li:before, | ||
.bignums-xxl>li:before { | ||
font-size: 1.15rem; | ||
display: block; | ||
position: absolute; | ||
top: 1rem; | ||
left: 1rem; | ||
height: 2em; | ||
width: 2em; | ||
line-height: 2em; | ||
text-align: center; | ||
background-color: #313131; | ||
color: #fff; | ||
border-radius: 50%; | ||
content: counter(li-counter, decimal); | ||
counter-increment: li-counter; | ||
font-weight: 600 | ||
} | ||
|
||
.bignums>li+li, | ||
.bignums-hint>li+li, | ||
.bignums-note>li+li, | ||
.bignums-caution>li+li, | ||
.bignums-warning>li+li, | ||
.bignums-attention>li+li, | ||
.bignums-important>li+li, | ||
.bignums-seealso>li+li, | ||
.bignums-tip>li+li, | ||
.bignums-danger>li+li, | ||
.bignums-error>li+li, | ||
.bignums-xxl>li+li { | ||
margin-top: 1rem | ||
} | ||
|
||
.bignums-hint>li, | ||
.bignums-note>li { | ||
background-color: #ebf7fb | ||
} | ||
|
||
.bignums-hint>li:before, | ||
.bignums-note>li:before { | ||
background-color: #5bc0de; | ||
color: #212121 | ||
} | ||
|
||
.bignums-caution>li, | ||
.bignums-warning>li, | ||
.bignums-attention>li { | ||
background-color: #fdf5ea | ||
} | ||
|
||
.bignums-caution>li:before, | ||
.bignums-warning>li:before, | ||
.bignums-attention>li:before { | ||
background-color: #f0ad4e; | ||
color: #212121 | ||
} | ||
|
||
.bignums-important>li, | ||
.bignums-seealso>li, | ||
.bignums-tip>li { | ||
background-color: #ebf6eb | ||
} | ||
|
||
.bignums-important>li:before, | ||
.bignums-seealso>li:before, | ||
.bignums-tip>li:before { | ||
background-color: #5cb85c; | ||
color: #fff | ||
} | ||
|
||
.bignums-danger>li, | ||
.bignums-error>li { | ||
background-color: #faeaea | ||
} | ||
|
||
.bignums-danger>li:before, | ||
.bignums-error>li:before { | ||
background-color: #d9534f; | ||
color: #fff | ||
} | ||
|
||
.bignums-xxl>li { | ||
padding: 0; | ||
padding-left: 3.75rem; | ||
padding-top: .375rem; | ||
background-color: transparent; | ||
min-height: 3rem | ||
} | ||
|
||
.bignums-xxl>li>.first { | ||
font-size: 1.5rem | ||
} | ||
|
||
.bignums-xxl>li:before { | ||
font-size: 1.5rem; | ||
top: 0; | ||
left: 0 | ||
} | ||
|
||
.bignums-xxl>li+li { | ||
border-top: 1px solid rgba(0, 0, 0, 0.15); | ||
margin-top: 1.375rem; | ||
padding-top: 1.375rem | ||
} | ||
|
||
.bignums-xxl>li+li:before { | ||
top: 1rem | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
html[data-theme=dark], | ||
html[data-theme=light] { | ||
--pst-color-primary: #ffa500; | ||
} | ||
|
||
html[data-theme=light] { | ||
--pst-color-secondary: #CC8400; | ||
} | ||
|
||
html[data-theme=dark] { | ||
--pst-color-secondary: #FFC04D; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
.sphinx-tabs { | ||
margin-bottom: 1rem; | ||
} | ||
|
||
[role="tablist"] { | ||
border-bottom: 1px solid #a0a0a0; | ||
} | ||
|
||
.sphinx-tabs-tab { | ||
position: relative; | ||
font-family: Lato,'Helvetica Neue',Arial,Helvetica,sans-serif; | ||
color: var(--pst-color-muted); | ||
line-height: 24px; | ||
margin: 0; | ||
font-size: 16px; | ||
font-weight: 400; | ||
background-color: var(--pst-color-background); | ||
border-radius: 5px 5px 0 0; | ||
border: 0; | ||
padding: 1rem 1.5rem; | ||
margin-bottom: 0; | ||
} | ||
|
||
.sphinx-tabs-tab[aria-selected="true"] { | ||
font-weight: 700; | ||
border: 1px solid #a0a0a0; | ||
border-bottom: 1px solid var(--pst-color-background); | ||
margin: -1px; | ||
background-color: var(--pst-color-background); | ||
|
||
box-shadow: 0 9px 0px -1px var(--pst-color-background), 0 3px 3px 0 var(--pst-color-shadow); | ||
} | ||
|
||
.sphinx-tabs-tab:focus { | ||
z-index: 1; | ||
outline-offset: 1px; | ||
} | ||
|
||
.sphinx-tabs-panel { | ||
position: relative; | ||
padding: 1rem; | ||
border: 1px solid #a0a0a0; | ||
margin: 0px -1px -1px -1px; | ||
border-radius: 0 0 5px 5px; | ||
border-top: 0; | ||
background: var(--pst-color-background); | ||
|
||
box-shadow: 0 3px 3px 0px var(--pst-color-shadow); | ||
} | ||
|
||
.sphinx-tabs-panel.code-tab { | ||
padding: 0.4rem; | ||
} | ||
|
||
.sphinx-tab img { | ||
margin-bottom: 24 px; | ||
} | ||
|
||
/* Dark theme preference styling */ | ||
|
||
@media (prefers-color-scheme: dark) { | ||
body[data-theme="auto"] .sphinx-tabs-panel { | ||
color: white; | ||
background-color: rgb(50, 50, 50); | ||
} | ||
|
||
body[data-theme="auto"] .sphinx-tabs-tab { | ||
color: white; | ||
background-color: rgba(255, 255, 255, 0.05); | ||
} | ||
|
||
body[data-theme="auto"] .sphinx-tabs-tab[aria-selected="true"] { | ||
border-bottom: 1px solid rgb(50, 50, 50); | ||
background-color: rgb(50, 50, 50); | ||
} | ||
} | ||
|
||
/* Explicit dark theme styling */ | ||
|
||
body[data-theme="dark"] .sphinx-tabs-panel { | ||
color: white; | ||
background-color: rgb(50, 50, 50); | ||
} | ||
|
||
body[data-theme="dark"] .sphinx-tabs-tab { | ||
color: white; | ||
background-color: rgba(255, 255, 255, 0.05); | ||
} | ||
|
||
body[data-theme="dark"] .sphinx-tabs-tab[aria-selected="true"] { | ||
border-bottom: 2px solid rgb(50, 50, 50); | ||
background-color: rgb(50, 50, 50); | ||
} |
Oops, something went wrong.