-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (60 loc) · 2.02 KB
/
documentation.yml
File metadata and controls
63 lines (60 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Deploy documentation
on:
push:
branches: [ "master" ]
paths-ignore:
- '.gitignore'
permissions:
pull-requests: write
deployments: write
contents: write
checks: read
jobs:
Build:
environment:
name: github-pages
url: 'https://adeola-aderibigbe.github.io/AdeNoteAPI/html'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Deploy to git pages
id: deployment
uses: DenverCoder1/doxygen-github-pages-action@v1.3.0
with:
folder: Docs/html
config_file: Docs/AdeNote_Configuration.config
github_token: ${{secrets.GITHUB_TOKEN}}
branch: gh-pages
- uses: actions/checkout@v3
- name: build test coverage xml
run: dotnet test AdeNote.Tests/AdeNote.Tests.csproj --collect:"XPlat Code Coverage"
- name: Generate code coverage report
uses: im-open/code-coverage-report-generator@4.9.2
with:
reports: "AdeNote.Tests/TestResults/**/coverage.cobertura.xml"
targetdir: "Docs/coverage"
reporttypes: 'Html;MarkdownSummary'
title: 'AdeNote Code Coverage'
tag: '${{ github.workflow}}_${{ github.run_id }}'
filefilters: '-Startup.cs;-Program.cs;'
toolpath: 'reportgeneratortool'
- name: add and commit code coverage to gh-page
run: |
git config --global user.name 'Adeola.Aderibigbe'
git config --global user.email 'adeola.aderibigbe@cyphercrescent.com'
git checkout --orphan docs-deploy
git rm -rf .
git add Docs/coverage/*.html
git add Docs/coverage/*.css
git add Docs/coverage/*.js
git add Docs/coverage/*.svg
git add Docs/coverage/*.md
git add Docs/coverage/*.htm
git commit -m "Add recent code coverage"
git config pull.rebase false
git pull origin gh-pages --allow-unrelated-histories
git push origin docs-deploy:gh-pages