Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
46 changes: 46 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
build:
permissions:
contents: read # To read repository contents
pull-requests: write # To write pull requests analysis results and artifacts

Check warning on line 20 in .github/workflows/build.yaml

View workflow job for this annotation

GitHub Actions / copilot

20:28 [comments] too few spaces before comment: expected 2

runs-on: ${{ inputs.os }}

Expand Down Expand Up @@ -127,3 +127,49 @@
**/manifest.spdx.json
**/manifest.spdx.json.sha256
*summary.md

build-docs:
Comment thread
Malcolmnixon marked this conversation as resolved.
Outdated
permissions:
contents: read # To read repository contents

runs-on: windows-latest

steps:

- name: Checkout
uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: 'lts/*'

- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
10.x

- name: Install mermaid-cli
run: npm install -g @mermaid-js/mermaid-cli

- name: Install mermaid-filter
run: npm install -g mermaid-filter

- name: Install Pandoc Tool
run: dotnet tool install --global DemaConsulting.PandocTool

- name: Install Weasyprint Tool
run: dotnet tool install --global DemaConsulting.WeasyprintTool

- name: Generate HTML with Pandoc
run: pandoc docs/guide/title.txt --defaults docs/guide/definition.yaml --output docs/guide/guide.html

- name: Generate PDF with Weasyprint
run: weasyprint docs/guide/guide.html docs/guide/guide.pdf

- name: Upload Documentation
uses: actions/upload-artifact@v6
with:
name: documentation
path: docs/guide/guide.pdf
13 changes: 13 additions & 0 deletions docs/guide/definition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
resource-path:
- docs/guide
- docs/template

input-files:
- docs/guide/guide.md

template: guide_template.html

table-of-contents: true

number-sections: true
14 changes: 14 additions & 0 deletions docs/guide/title.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: TestResults Library
subtitle: Developer Guide
lang: en-US
keywords:
- TestResults
- C#
- .NET
- TRX
- JUnit
- Test Results
- Testing
- Documentation
---
178 changes: 178 additions & 0 deletions docs/template/guide_template.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: #333;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}

h1, h2, h3, h4, h5, h6 {
margin-top: 24px;
margin-bottom: 16px;
font-weight: 600;
line-height: 1.25;
}

h1 {
font-size: 2em;
border-bottom: 1px solid #eaecef;
padding-bottom: 0.3em;
}

h2 {
font-size: 1.5em;
border-bottom: 1px solid #eaecef;
padding-bottom: 0.3em;
}

h3 {
font-size: 1.25em;
}

h4 {
font-size: 1em;
}

h5 {
font-size: 0.875em;
}

h6 {
font-size: 0.85em;
color: #6a737d;
}

code {
background-color: #f6f8fa;
border-radius: 3px;
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
font-size: 85%;
padding: 0.2em 0.4em;
}

pre {
background-color: #f6f8fa;
border-radius: 3px;
font-size: 85%;
line-height: 1.45;
overflow: auto;
padding: 16px;
}

pre code {
background-color: transparent;
border: 0;
display: inline;
line-height: inherit;
margin: 0;
max-width: auto;
overflow: visible;
padding: 0;
word-wrap: normal;
}

blockquote {
border-left: 0.25em solid #dfe2e5;
color: #6a737d;
padding: 0 1em;
margin: 0 0 16px 0;
}

table {
border-collapse: collapse;
margin: 16px 0;
width: 100%;
}

table th, table td {
border: 1px solid #dfe2e5;
padding: 6px 13px;
}

table tr {
background-color: #fff;
border-top: 1px solid #c6cbd1;
}

table tr:nth-child(2n) {
background-color: #f6f8fa;
}

ul, ol {
padding-left: 2em;
margin-bottom: 16px;
}

li + li {
margin-top: 0.25em;
}

a {
color: #0366d6;
text-decoration: none;
}

a:hover {
text-decoration: underline;
}

.title-page {
text-align: center;
margin-top: 100px;
margin-bottom: 100px;
}

.title-page h1 {
font-size: 3em;
border-bottom: none;
}

.title-page h2 {
font-size: 2em;
color: #6a737d;
border-bottom: none;
}

#TOC {
border: 1px solid #dfe2e5;
border-radius: 3px;
padding: 16px;
margin: 24px 0;
background-color: #f6f8fa;
}

#TOC ul {
list-style-type: none;
padding-left: 0;
}

#TOC ul ul {
padding-left: 20px;
}

#TOC > ul > li {
margin-top: 8px;
}

#TOC a {
color: #0366d6;
}

@media print {
body {
max-width: none;
}

.title-page {
page-break-after: always;
}

h1, h2, h3 {
page-break-after: avoid;
}

pre, blockquote {
page-break-inside: avoid;
}
}
28 changes: 28 additions & 0 deletions docs/template/guide_template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="$lang$">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>$if(title)$$title$$endif$</title>
<link rel="stylesheet" href="../template/guide_template.css">
</head>
<body>
$if(title)$
<div class="title-page">
<h1>$title$</h1>
$if(subtitle)$
<h2>$subtitle$</h2>
$endif$
</div>
$endif$

$if(toc)$
<nav id="TOC">
<h2>Table of Contents</h2>
$toc$
</nav>
$endif$

$body$
</body>
</html>
Loading