Skip to content

Commit

Permalink
Add mkdocs publishing of OSEP site
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Albertella <[email protected]>
  • Loading branch information
reiterative committed Oct 28, 2024
1 parent 2f31160 commit 108f22f
Show file tree
Hide file tree
Showing 12 changed files with 264 additions and 30 deletions.
55 changes: 25 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,38 @@ name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
# Triggers the workflow on push events for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches: [ mkdocs ]

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

# Needs write permission to update the gh-pages branch that is used for GitHub Pages
permissions:
contents: write

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
# Copied from https://squidfunk.github.io/mkdocs-material/publishing-your-site/
deploy:
runs-on: ubuntu-latest

env:
STPATOOLS_VERSION: "42e07abc5510f5864aa102aa7ae1e8349911a620"
STPATOOLS_REPO: "https://gitlab.com/CodethinkLabs/stpatools.git"

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Check that YAML files are well-formed
- name: YAML lint
run: yamllint -d relaxed .

# Install specific version of ruamel.yaml required by STPAtools
- name: Install ruamel.yaml
run: pip3 install ruamel.yaml==0.16.7

# Install specific version of STPA tools from repo
- name: Install STPA tools
run: pip3 install "git+${{env.STPATOOLS_REPO}}@${{env.STPATOOLS_VERSION}}"

# Validate STPA files
- name: Validate STPA files (STPA_DynMA)
run: stpa-validate STPA_DynMA/*.yml
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
1 change: 1 addition & 0 deletions docs/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
osep.elisa.tech
190 changes: 190 additions & 0 deletions docs/images/elisa-horizontal-color.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/favicon.ico
Binary file not shown.
6 changes: 6 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# ELISA OSEP working group

Welcome to the home of the Open Source Engineering Process (OSEP) working group.

OSEP is a working groups of the Linux Foundation's
[Enabling Linux In Safety Applications (ELISA)](https://elisa.tech/) project.
11 changes: 11 additions & 0 deletions docs/stylesheets/elisa.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:root {

--elisa-green: #77c046;

--md-default-fg-color: slategrey;
--md-default-bg-color: white;

--md-primary-fg-color: black;
--md-primary-bg-color: var(--elisa-green);

}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
31 changes: 31 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
site_name: ELISA OSEP
repo_url: https://github.com/elisa-tech/wg-osep
site_url: https://osep.elisa.tech/
site_dir: public

theme:
name: material
logo: images/elisa-horizontal-color.svg
favicon: images/favicon.ico
icon:
repo: fontawesome/brands/gitlab
font:
text: Open Sans
code: Fira Code
features:
- content.code.copy
- content.code.annotate
- navigation.footer
- navigation.top

extra_css:
- stylesheets/elisa.css

use_directory_urls: false

plugins:
- search

nav:
- ELISA: https://elisa.tech/
- Home: index.md

0 comments on commit 108f22f

Please sign in to comment.