Skip to content

Commit 257294f

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

File tree

8 files changed

+428
-27
lines changed

8 files changed

+428
-27
lines changed

.github/workflows/main.yml

Lines changed: 61 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,78 @@
1-
name: CI
1+
name: main-deploy
22

33
# Controls when the workflow will run
44
on:
5-
# Triggers the workflow on push or pull request events but only for the main branch
5+
# Triggers the workflow on push events for the main branch
66
push:
77
branches: [ main ]
8-
pull_request:
9-
branches: [ main ]
108

119
# Allows you to run this workflow manually from the Actions tab
1210
workflow_dispatch:
1311

12+
# Needs write permission to update the gh-pages branch that is used for GitHub Pages
13+
permissions:
14+
contents: write
15+
1416
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1517
jobs:
16-
# This workflow contains a single job called "build"
17-
build:
18-
# The type of runner that the job will run on
18+
# This workflow contains a single job called "deploy"
19+
# Copied from https://squidfunk.github.io/mkdocs-material/publishing-your-site/
20+
deploy:
1921
runs-on: ubuntu-latest
20-
21-
env:
22-
STPATOOLS_VERSION: "42e07abc5510f5864aa102aa7ae1e8349911a620"
23-
STPATOOLS_REPO: "https://gitlab.com/CodethinkLabs/stpatools.git"
24-
25-
# Steps represent a sequence of tasks that will be executed as part of the job
2622
steps:
27-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
28-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v4
24+
- name: Configure Git Credentials
25+
run: |
26+
git config user.name github-actions[bot]
27+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
28+
- uses: actions/setup-python@v5
29+
with:
30+
python-version: 3.x
31+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
32+
- uses: actions/cache@v4
33+
with:
34+
key: mkdocs-material-${{ env.cache_id }}
35+
path: .cache
36+
restore-keys: |
37+
mkdocs-material-
38+
- run: pip install mkdocs-material mkdocs-material-extensions pymdown-extensions
39+
- run: mkdocs gh-deploy --force
40+
41+
name: push-preview
2942

30-
# Check that YAML files are well-formed
31-
- name: YAML lint
32-
run: yamllint -d relaxed .
43+
on:
44+
# Triggers on pull request branch when it is marked ready for review
45+
pull_request:
46+
type: [ready_for_review]
3347

34-
# Install specific version of ruamel.yaml required by STPAtools
35-
- name: Install ruamel.yaml
36-
run: pip3 install ruamel.yaml==0.16.7
48+
# Allows you to run this workflow manually from the Actions tab
49+
workflow_dispatch:
3750

38-
# Install specific version of STPA tools from repo
39-
- name: Install STPA tools
40-
run: pip3 install "git+${{env.STPATOOLS_REPO}}@${{env.STPATOOLS_VERSION}}"
51+
# Needs write permission to update the gh-pages branch that is used for GitHub Pages
52+
permissions:
53+
contents: write
4154

42-
# Validate STPA files
43-
- name: Validate STPA files (STPA_DynMA)
44-
run: stpa-validate STPA_DynMA/*.yml
55+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
56+
jobs:
57+
# This workflow contains a single job called "preview"
58+
# This deploys PR content to a preview sub-directory
59+
deploy:
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
- name: Configure Git Credentials
64+
run: |
65+
git config user.name github-actions[bot]
66+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
67+
- uses: actions/setup-python@v5
68+
with:
69+
python-version: 3.x
70+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
71+
- uses: actions/cache@v4
72+
with:
73+
key: mkdocs-material-${{ env.cache_id }}
74+
path: .cache
75+
restore-keys: |
76+
mkdocs-material-
77+
- run: pip install mkdocs-material mkdocs-material-extensions pymdown-extensions
78+
- run: mkdocs gh-deploy -v -d preview/ --force

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: 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/gitlab
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+

0 commit comments

Comments
 (0)