Skip to content

Commit

Permalink
Add documentation to gir.core repository
Browse files Browse the repository at this point in the history
  • Loading branch information
badcel committed Apr 2, 2024
1 parent ce07ad0 commit 30b4689
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 8 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Deploy documentation

on:
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5

- name: Prepare .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Call generator
run: dotnet fsi GenerateLibs.fsx
working-directory: './src'
- name: Restore solution
run: dotnet restore GirCore.Libs.slnf
working-directory: './src'

- name: Install docfx
run: dotnet tool update -g docfx
- name: Build website
run: docfx docs/docfx.json
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './_site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions docs/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# GirCore Api Documentation
Please select the namespace you are interested in on the left side.
39 changes: 39 additions & 0 deletions docs/docfx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"metadata": [
{
"src": [
{
"src": "../src/Libs",
"files": ["**/*.csproj"],
"exclude": ["GirTest-0.1/**"]
}
],
"dest": "api"
}
],
"build": {
"content": [
{
"files": ["**/*.{md,yml}"],
"exclude": ["_site/**"]
}
],
"resource": [
{
"files": ["img/**"]
}
],
"output": "../_site",
"template": [
"default",
"modern"
],
"globalMetadata": {
"_appName": "GirCore",
"_appTitle": "GirCore",
"_appLogoPath": "img/gircore-logo.svg",
"_enableSearch": true,
"pdf": false
}
}
}
File renamed without changes.
15 changes: 9 additions & 6 deletions docs/docs/toc.yml → docs/toc.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
items:
- name: Home
href: ../index.md
href: index.md
- name: Api Documentation
href: api/
homepage: api/index.md
- name: Use
items:
- name: Get started
href: use.md
href: docs/use.md
- name: Apps
href: apps.md
href: docs/apps.md
- name: Libraries
href: libraries.md
href: docs/libraries.md
- name: Contribute
items:
- name: Guidelines
href: contributing.md
href: docs/contributing.md
- name: Build
href: build.md
href: docs/build.md
- name: Github
href: https://github.com/gircore/
13 changes: 11 additions & 2 deletions src/GirCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionIt
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{0D9C5C7E-F81B-4E0E-B203-22D558E6D7F1}"
ProjectSection(SolutionItems) = preProject
..\docs\readme.md = ..\docs\readme.md
..\docs\index.md = ..\docs\index.md
..\docs\toc.yml = ..\docs\toc.yml
..\docs\docfx.json = ..\docs\docfx.json
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "img", "img", "{C48DB577-12BB-4AA8-8734-802A39C093BE}"
Expand All @@ -105,6 +107,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
..\.github\workflows\ci.yml = ..\.github\workflows\ci.yml
..\.github\workflows\codeql-analysis.yml = ..\.github\workflows\codeql-analysis.yml
..\.github\workflows\update-gir-files.yml = ..\.github\workflows\update-gir-files.yml
..\.github\workflows\documentation.yml = ..\.github\workflows\documentation.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Generation", "Generation", "{5D5D80C1-4D21-4619-8B59-7B7750016E9D}"
Expand Down Expand Up @@ -153,7 +156,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{4EE9860B-6
..\docs\docs\use.md = ..\docs\docs\use.md
..\docs\docs\apps.md = ..\docs\docs\apps.md
..\docs\docs\build.md = ..\docs\docs\build.md
..\docs\docs\toc.yml = ..\docs\docs\toc.yml
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Adw-1", "Libs\Adw-1\Adw-1.csproj", "{CC67D284-6ADE-4F4D-9EE0-544143A7FF40}"
Expand All @@ -180,6 +182,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "img", "img", "{15AC3143-968
ProjectSection(SolutionItems) = preProject
..\docs\img\GstSintel.png = ..\docs\img\GstSintel.png
..\docs\img\GtkApp.png = ..\docs\img\GtkApp.png
..\docs\img\gircore-logo.svg = ..\docs\img\gircore-logo.svg
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GtkSource-5", "Libs\GtkSource-5\GtkSource-5.csproj", "{9D19B388-AD8B-4DC5-B351-5D9FCEAE8FEA}"
Expand Down Expand Up @@ -222,6 +225,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ListView", "Samples\Gtk-4.0
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GridView", "Samples\Gtk-4.0\GridView\GridView.csproj", "{EE13D29A-42BC-4694-9980-D0498AA15115}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "api", "api", "{23ED17AC-703E-40D6-8B4C-0DAE232E1E33}"
ProjectSection(SolutionItems) = preProject
..\docs\api\index.md = ..\docs\api\index.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -945,5 +953,6 @@ Global
{48FEE015-C1AD-41EE-A39D-E441F03AC5A3} = {7B70E5ED-C5E7-4F32-A458-E5A10F39DA00}
{3F6B722F-5192-46BC-A389-5E40ABA9041B} = {7B70E5ED-C5E7-4F32-A458-E5A10F39DA00}
{EE13D29A-42BC-4694-9980-D0498AA15115} = {7B70E5ED-C5E7-4F32-A458-E5A10F39DA00}
{23ED17AC-703E-40D6-8B4C-0DAE232E1E33} = {0D9C5C7E-F81B-4E0E-B203-22D558E6D7F1}
EndGlobalSection
EndGlobal

0 comments on commit 30b4689

Please sign in to comment.