Skip to content

Commit 8d6c1a1

Browse files
committed
Add mkdocs publish support
Signed-off-by: Paul Albertella <[email protected]>
1 parent 2f31160 commit 8d6c1a1

File tree

10 files changed

+444
-44
lines changed

10 files changed

+444
-44
lines changed

.github/workflows/deploy.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Workflow to build and deploy to GitHub Pages, with previews for PRs
2+
# Based on https://github.com/daiyi/gh-pages-pr-previews
3+
4+
name: github pages
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
pull_request:
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-20.04
15+
env:
16+
PR_PATH: pull/${{github.event.number}}
17+
steps:
18+
- name: Comment on PR
19+
uses: hasura/[email protected]
20+
if: github.ref != 'refs/heads/main'
21+
with:
22+
github-token: ${{ secrets.GITHUB_TOKEN }}
23+
repository: ${{ github.repository }}
24+
number: ${{ github.event.number }}
25+
id: deploy-preview
26+
message: "Starting deployment of preview ⏳..."
27+
28+
- name: Set domain
29+
run: echo "DOMAIN=osep.elisa.tech" >> $GITHUB_ENV
30+
31+
- name: Set base URL for preview if PR
32+
if: github.ref != 'refs/heads/main'
33+
run: echo "BASE_URL=https://${{ env.DOMAIN }}/${{ env.PR_PATH}}/" >> $GITHUB_ENV
34+
35+
- name: Setup python
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version: 3.x
39+
40+
- name: Install dependencies
41+
uses: py-actions/py-dependency-install@v4
42+
with:
43+
path: "requirements.txt"
44+
45+
- name: Build site
46+
run: mkdocs build
47+
48+
- name: Deploy if this is the `main` branch
49+
uses: peaceiris/actions-gh-pages@v3
50+
if: github.ref == 'refs/heads/main'
51+
with:
52+
github_token: ${{ secrets.GITHUB_TOKEN }}
53+
publish_dir: ./public
54+
cname: ${{ env.DOMAIN }}
55+
56+
- name: Deploy to PR preview
57+
uses: peaceiris/actions-gh-pages@v3
58+
if: github.ref != 'refs/heads/main'
59+
with:
60+
github_token: ${{ secrets.GITHUB_TOKEN }}
61+
publish_dir: ./public
62+
destination_dir: ${{ env.PR_PATH }}
63+
keep_files: true
64+
65+
- name: Update comment
66+
uses: hasura/[email protected]
67+
if: github.ref != 'refs/heads/main'
68+
with:
69+
github-token: ${{ secrets.GITHUB_TOKEN }}
70+
repository: ${{ github.repository }}
71+
number: ${{ github.event.number }}
72+
id: deploy-preview
73+
message: "A preview of ${{ github.event.after }} is here:\n\n ✨ ${{ env.BASE_URL }}"

.github/workflows/main.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

docs/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
osep.elisa.tech

docs/images/elisa-horizontal-color.svg

Lines changed: 190 additions & 0 deletions
Loading

docs/images/elisa-logo.svg

Lines changed: 72 additions & 0 deletions
Loading

docs/images/favicon.ico

4.21 KB
Binary file not shown.

docs/index.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
![ELISA - Enabling Linux in Safety Applications](images/elisa-horizontal-color.svg){: .elisa-title-image }
2+
3+
# Welcome to OSEP
4+
5+
This is the home of the **Open Source Engineering Process (OSEP)** working
6+
group, part of the Linux Foundation's [ELISA](https://elisa.tech/) project
7+
8+
This working group examines how software engineering processes can be used to
9+
facilitate the certification of safety-related systems incorporating Linux and
10+
other FOSS. We consider the roles that a Linux-based OS might have in such
11+
systems; how FOSS developers, system integrators and product creators can
12+
specify these roles; and the evidence they might need to provide to support
13+
associated safety arguments.
14+
15+
Use the menu on the left to navigate within the site, and the _Table of
16+
contents_ on the right to browse within a page. Alternatively, type what you
17+
are looking for in the _Search_ box above.
18+

docs/stylesheets/elisa.css

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
:root {
2+
3+
--elisa-green: #77c046;
4+
5+
--md-default-fg-color: slategrey;
6+
--md-default-bg-color: white;
7+
8+
--md-primary-fg-color: black;
9+
--md-primary-bg-color: var(--elisa-green);
10+
11+
--md-typeset-a-color: darkgreen;
12+
--md-accent-fg-color: var(--elisa-green);
13+
14+
}
15+
16+
.md-typeset__table {
17+
min-width: 100%;
18+
}
19+
20+
.md-typeset table:not([class]) {
21+
display: table;
22+
border: none;
23+
}
24+
25+
td {
26+
background-color: #f0f0f0;
27+
margin: 2px;
28+
}
29+
30+
th {
31+
background-color: darkgreen;
32+
color: var(--elisa-green);
33+
}
34+
35+
th:first-child {
36+
border-top-left-radius: 10px;
37+
}
38+
39+
th:last-child {
40+
border-top-right-radius: 10px;
41+
}
42+
43+
.elisa-title-image {
44+
width: 50%;
45+
float: right;
46+
padding-left: 10px;
47+
}

mkdocs.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
site_name: ELISA - Open Source Engineering Process
2+
repo_url: https://github.com/elisa-tech/wg-osep
3+
site_url: !ENV [BASE_URL, https://osep.elisa.tech/]
4+
site_dir: public
5+
6+
theme:
7+
name: material
8+
logo: images/elisa-logo.svg
9+
favicon: images/favicon.ico
10+
icon:
11+
repo: fontawesome/brands/github
12+
font:
13+
text: Open Sans
14+
code: Fira Code
15+
features:
16+
- content.code.copy
17+
- content.code.annotate
18+
- navigation.footer
19+
- navigation.top
20+
21+
extra_css:
22+
- stylesheets/elisa.css
23+
24+
use_directory_urls: false
25+
26+
plugins:
27+
- search
28+
29+
markdown_extensions:
30+
- attr_list
31+
- pymdownx.pathconverter:
32+
absolute: true
33+
34+
nav:
35+
- ELISA: https://elisa.tech/
36+
- OSEP:
37+
- Home: index.md
38+
39+

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
mkdocs==1.6.0
2+
mkdocs-material==9.5.22
3+
mkdocs-material-extensions==1.3.1
4+
pymdown-extensions==10.12

0 commit comments

Comments
 (0)