Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Every push to main that changes the user guide: build the website from docs (mkdocs.yml) and publish it to
# GitHub Pages (https://flysimdev.github.io/OrthoStreamXP/). Settings > Pages > Source must be "GitHub Actions".
name: User guide website

on:
push:
branches: [main]
paths:
- 'docs/**'
- 'mkdocs.yml'
- '.github/workflows/pages.yml'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# One deployment at a time; a newer push waits rather than cancelling one that is publishing.
concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
cache-dependency-path: docs/requirements.txt

- name: Install MkDocs
run: pip install -r docs/requirements.txt

# --strict: a broken link between pages fails the build, and the published site stays as it was.
- name: Build
run: mkdocs build --strict

- uses: actions/upload-pages-artifact@v3
with:
path: site

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ temp_scripts/
artifacts/
TestResults/
.vscode
site/
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mkdocs==1.6.1
mkdocs-material==9.6.14
52 changes: 52 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# The user guide website (GitHub Pages), built from the pages in docs by .github/workflows/pages.yml.
# Preview locally: pip install -r docs/requirements.txt, then python -m mkdocs serve (http://127.0.0.1:8000).
site_name: OrthoStreamXP user guide
site_description: Streamed photo scenery for X-Plane 12
site_url: https://flysimdev.github.io/OrthoStreamXP/
repo_url: https://github.com/flysimdev/OrthoStreamXP
repo_name: flysimdev/OrthoStreamXP
edit_uri: edit/main/docs/

docs_dir: docs
# The PDF's stylesheet and the site's build requirements are not pages.
exclude_docs: |
user-guide.css
requirements.txt

# The same order as the guide's contents (docs/README.md) and build-user-guide.ps1.
nav:
- Home: README.md
- installation.md
- first-setup.md
- flying.md
- settings.md
- cache.md
- troubleshooting.md
- Questions and answers: faq.md
- User guide (PDF): OrthoStreamXP-UserGuide.pdf

theme:
name: material
features:
- navigation.instant
- navigation.top
- toc.follow
- search.highlight
- content.action.edit
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/weather-night
name: Dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/weather-sunny
name: Light mode

markdown_extensions:
- admonition
- attr_list
- toc:
permalink: true
Loading