Skip to content

Commit

Permalink
build(docs): proper docs building
Browse files Browse the repository at this point in the history
  • Loading branch information
R-unic committed Jan 21, 2025
1 parent 4a46793 commit 45036a9
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ jobs:
run: dotnet tool install -g docfx

- name: Generate Documentation
run: docfx build
run: |
docfx metadata
docfx build
- name: Clean up _site folder
run: |
Expand All @@ -45,7 +47,7 @@ jobs:
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git checkout --orphan docs
git --work-tree _site add --all
git --work-tree _site commit -m "Update documentation"
git --work-tree _site commit -m "docs: automatic update"
git push https://github-actions:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} HEAD:docs --force
- name: Upload artifact
Expand Down
46 changes: 46 additions & 0 deletions docfx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json",
"metadata": [
{
"src": [
{
"src": "../Heir",
"files": [
"**/*.csproj"
]
}
],
"dest": "api"
}
],
"build": {
"content": [
{
"files": [
"**/*.{md,yml}"
],
"exclude": [
"_site/**"
]
}
],
"resource": [
{
"files": [
"images/**"
]
}
],
"output": "_site",
"template": [
"default",
"modern"
],
"globalMetadata": {
"_appName": "heir-docs",
"_appTitle": "heir-docs",
"_enableSearch": true,
"pdf": false
}
}
}
3 changes: 3 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Getting started

TODO
2 changes: 2 additions & 0 deletions docs/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- name: Getting Started
href: getting-started/
6 changes: 6 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
_layout: landing
---

# Heir Docs
Welcome to the Heir docs!
4 changes: 4 additions & 0 deletions toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: Docs
href: docs/
- name: API
href: api/

0 comments on commit 45036a9

Please sign in to comment.