Skip to content

Commit b2ddd87

Browse files
authored
Merge pull request #11 from dcronqvist/dev
Add docs and github-pages
2 parents bd45d37 + 96ad2af commit b2ddd87

File tree

145 files changed

+405
-133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+405
-133
lines changed

.editorconfig

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,11 @@ charset = utf-8
55
end_of_line = lf
66
indent_size = 2
77
indent_style = space
8-
insert_final_newline = true
8+
insert_final_newline = true
9+
10+
[.github/**/*.yml]
11+
charset = utf-8
12+
end_of_line = lf
13+
indent_size = 2
14+
indent_style = space
15+
insert_final_newline = true

.github/workflows/deploy-docs.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
6+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
7+
permissions:
8+
actions: read
9+
pages: write
10+
id-token: write
11+
12+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
13+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
deploy-docs:
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v2
27+
- name: Setup .NET
28+
uses: actions/setup-dotnet@v4
29+
with:
30+
dotnet-version: 8.0.x
31+
- name: Setup DocFX
32+
run: dotnet tool update -g docfx
33+
- name: Build docs
34+
run: make docs-build
35+
- name: Upload docs
36+
uses: actions/upload-pages-artifact@v3
37+
with:
38+
path: docs/_site
39+
- name: Deploy docs
40+
id: deployment
41+
uses: actions/deploy-pages@v4

.github/workflows/tests.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- master
5+
- dev
6+
7+
jobs:
8+
tests:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up .NET
13+
uses: actions/setup-dotnet@v4
14+
with:
15+
dotnet-version: 8.0.x
16+
- name: Restore dependencies
17+
run: dotnet restore src/DotTiled.sln
18+
- name: Build
19+
run: dotnet build --no-restore src/DotTiled.sln
20+
- name: Test
21+
run: dotnet test --no-build --verbosity normal src/DotTiled.sln
22+

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
##
44
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
55

6+
# Generated docs
7+
docs/_site/
8+
docs/api/
9+
docs/index.md
10+
611
# User-specific files
712
*.rsuser
813
*.suo

DotTiled/Model/Layers/Objects/PointObject.cs

Lines changed: 0 additions & 3 deletions
This file was deleted.

DotTiled/Serialization/Tmj/Tmj.Wangset.cs

Lines changed: 0 additions & 13 deletions
This file was deleted.

FUNDING.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
test:
2-
dotnet test
2+
dotnet test src/DotTiled.sln
3+
4+
docs-serve: docs-build
5+
docfx docs/docfx.json --serve
6+
7+
docs-build:
8+
cp README.md docs/index.md
9+
docfx docs/docfx.json
310

411
BENCHMARK_SOURCES = DotTiled.Benchmark/Program.cs DotTiled.Benchmark/DotTiled.Benchmark.csproj
512
BENCHMARK_OUTPUTDIR = DotTiled.Benchmark/BenchmarkDotNet.Artifacts

README.md

Lines changed: 2 additions & 5 deletions

docs/docfx.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"metadata": [
3+
{
4+
"src": [
5+
{
6+
"src": "../src",
7+
"files": [
8+
"DotTiled/DotTiled.csproj"
9+
]
10+
}
11+
],
12+
"dest": "api"
13+
}
14+
],
15+
"build": {
16+
"content": [
17+
{
18+
"files": [
19+
"**/*.{md,yml}"
20+
],
21+
"exclude": [
22+
"_site/**"
23+
]
24+
}
25+
],
26+
"resource": [
27+
{
28+
"files": [
29+
"images/**"
30+
]
31+
}
32+
],
33+
"output": "_site",
34+
"template": [
35+
"default",
36+
"modern",
37+
"template"
38+
],
39+
"globalMetadata": {
40+
"_appName": "DotTiled",
41+
"_appTitle": "DotTiled",
42+
"_enableSearch": true,
43+
"pdf": true
44+
}
45+
}
46+
}

0 commit comments

Comments
 (0)