Skip to content

Commit

Permalink
feat: scaffolding to generate documenation/gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelLarkin committed Nov 27, 2024
1 parent a48a4ec commit 7c7325c
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# You need to enable github to host your pages.
# github.com > Settings > Pages > Build and deployment:
# > Source > Deploy from a branches
# > Branch > gh-pages / `/root`
name: Deploy docs

on:
push:
branches:
- main
paths:
- "**.md"
- "mkdocs.yml"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
docs:
# Create latest docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup doc deploy
run: |
git config user.name 'github-actions[bot]'
git config user.email '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: site
restore-keys: |
mkdocs-material-
- run: pip install -r docs/requirements.txt
- run: mkdocs gh-deploy --force
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
site/
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# MSLC Graphs 2024
27 changes: 27 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# [mkdocs](https://github.com/mkdocs/mkdocs):
# Project documentation with Markdown.
mkdocs>=1.5.2

# [mkdocs-click](https://github.com/mkdocs/mkdocs-click):
# An MkDocs extension to generate documentation for Click command line applications.
#mkdocs-click>=0.8.0

# [mkdocs-typer](https://github.com/bruce-szalwinski/mkdocs-typer):
# An MkDocs extension to generate documentation for Typer command line applications.
#mkdocs-typer>=0.0.3

# [mkdocs-material](https://github.com/squidfunk/mkdocs-material):
# Documentation that simply works.
mkdocs-material>=9.2.5

# [mkdocstrings](https://github.com/mkdocstrings/mkdocstrings):
# 📘 Automatic documentation from sources, for MkDocs.
#mkdocstrings[python]>=0.22.0

# [mkdocs-macros-plugin](https://github.com/fralau/mkdocs_macros_plugin):
# Create richer and more beautiful pages in MkDocs, by using variables and calls to macros in the markdown code.
mkdocs-macros-plugin>=1.0.4

# [mike](Manage multiple versions of your MkDocs-powered documentation via Git):
# Manage multiple versions of your MkDocs-powered documentation via Git
mike>=1.1.2
58 changes: 58 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# [mkdocs](https://www.mkdocs.org/)
# pip install --user -r docs/requirements.txt
# mkdocs build
# mkdocs gh-deploy
# mkdocs serve
site_name: Figures for MSLC — Figures pour MSLC
site_url: https://nrc-cnrc.github.io/MSLC
repo_url: https://github.com/nrc-cnrc/MSLC
repo_name: NRC-CNRC / MSLC
theme:
name: material
favicon: favicon-32x32.png
palette:
# Palette toggle for dark mode
- primary: blue
scheme: slate
toggle:
icon: material/weather-night
name: Switch to light mode

# Palette toggle for light mode
- accent: light blue
scheme: default
toggle:
icon: material/weather-sunny
name: Switch to dark mode
features:
- content.code.copy
- content.code.select
- announce.dismiss
highlightjs: true
hljs_languages:
- bash
- go
- python
- rust
- yaml
shortcuts:
help: 191 # ?
next: 78 # n
previous: 80 # p
search: 83 # s
plugins:
- search
- macros
extra:
homepage: https://github.com/nrc-cnrc/MSLC
version:
provider: mike
default: stable
markdown_extensions:
- admonition
# - pymdownx.details
# - pymdownx.superfences
- toc:
permalink: true
nav:
- Home: README.md

0 comments on commit 7c7325c

Please sign in to comment.