Skip to content

Commit 9d0c642

Browse files
committed
update: .github/workflows/
1 parent af25790 commit 9d0c642

2 files changed

Lines changed: 97 additions & 90 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 55 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,55 @@
1-
name: Build and deploy GH Pages
2-
3-
## ref: https://dotnet.github.io/docfx/index.html
4-
5-
on:
6-
push:
7-
branches:
8-
- main
9-
paths:
10-
- '.github/workflows/**'
11-
- 'docfx/**'
12-
- 'README.md'
13-
- 'NF.Tool.ReleaseNoteMaker/**'
14-
15-
jobs:
16-
publish-docs:
17-
environment:
18-
name: github-pages
19-
url: ${{ steps.deployment.outputs.page_url }}
20-
runs-on: ubuntu-latest
21-
steps:
22-
- name: Checkout
23-
uses: actions/checkout@v4
24-
25-
- name: Cache NuGet packages
26-
uses: actions/cache@v4
27-
with:
28-
path: ~/.nuget/packages
29-
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
30-
restore-keys: |
31-
${{ runner.os }}-nuget-
32-
33-
- name: Dotnet Setup
34-
uses: actions/setup-dotnet@v4
35-
with:
36-
dotnet-version: 9.x
37-
38-
- name: Install DocFX
39-
run: |
40-
dotnet tool update -g docfx
41-
- name: Build DocFX
42-
run: |
43-
docfx docfx/docfx.json
44-
touch ./docfx/_site/.nojekyll
45-
46-
- name: Deploy
47-
uses: peaceiris/actions-gh-pages@v4
48-
if: ${{ github.ref == 'refs/heads/main' }}
49-
with:
50-
github_token: ${{ secrets.GITHUB_TOKEN }}
51-
publish_dir: ./docfx/_site
1+
name: Build and deploy GH Pages
2+
3+
## ref: https://dotnet.github.io/docfx/index.html
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
paths:
10+
- '.github/workflows/**'
11+
- 'docfx/**'
12+
- 'README.md'
13+
- 'NF.Tool.ReleaseNoteMaker/**'
14+
15+
jobs:
16+
publish-docs:
17+
environment:
18+
name: github-pages
19+
url: ${{ steps.deployment.outputs.page_url }}
20+
runs-on: ubuntu-latest
21+
steps:
22+
# https://github.com/actions/checkout
23+
- name: Checkout
24+
uses: actions/checkout@v5
25+
26+
# https://github.com/actions/cache
27+
- name: Cache NuGet packages
28+
uses: actions/cache@v4
29+
with:
30+
path: ~/.nuget/packages
31+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
32+
restore-keys: |
33+
${{ runner.os }}-nuget-
34+
35+
# https://github.com/actions/setup-dotnet
36+
- name: Dotnet Setup
37+
uses: actions/setup-dotnet@v5
38+
with:
39+
dotnet-version: 10.x
40+
41+
- name: Install DocFX
42+
run: |
43+
dotnet tool update -g docfx
44+
- name: Build DocFX
45+
run: |
46+
docfx docfx/docfx.json
47+
touch ./docfx/_site/.nojekyll
48+
49+
# https://github.com/peaceiris/actions-gh-pages
50+
- name: Deploy
51+
uses: peaceiris/actions-gh-pages@v4
52+
if: ${{ github.ref == 'refs/heads/main' }}
53+
with:
54+
github_token: ${{ secrets.GITHUB_TOKEN }}
55+
publish_dir: ./docfx/_site

.github/workflows/dotnet-test.yml

Lines changed: 42 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,42 @@
1-
name: .NET Test Workflow
2-
3-
on:
4-
push:
5-
branches:
6-
- main
7-
paths:
8-
- '.github/workflows/**'
9-
- 'NF.Tool.ReleaseNoteMaker/**'
10-
pull_request:
11-
branches:
12-
- main
13-
paths:
14-
- '.github/workflows/**'
15-
- 'NF.Tool.ReleaseNoteMaker/**'
16-
17-
jobs:
18-
build:
19-
runs-on: ubuntu-latest
20-
steps:
21-
- name: Checkout
22-
uses: actions/checkout@v4
23-
24-
- name: Cache NuGet packages
25-
uses: actions/cache@v4
26-
with:
27-
path: ~/.nuget/packages
28-
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
29-
restore-keys: |
30-
${{ runner.os }}-nuget-
31-
32-
- name: Dotnet Setup
33-
uses: actions/setup-dotnet@v4
34-
with:
35-
dotnet-version: 9.x
36-
37-
- name: Run tests
38-
working-directory: NF.Tool.ReleaseNoteMaker
39-
run: dotnet test --configuration Release --verbosity normal
1+
name: .NET Test Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '.github/workflows/**'
9+
- 'NF.Tool.ReleaseNoteMaker/**'
10+
pull_request:
11+
branches:
12+
- main
13+
paths:
14+
- '.github/workflows/**'
15+
- 'NF.Tool.ReleaseNoteMaker/**'
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
# https://github.com/actions/checkout
22+
- name: Checkout
23+
uses: actions/checkout@v5
24+
25+
# https://github.com/actions/cache
26+
- name: Cache NuGet packages
27+
uses: actions/cache@v4
28+
with:
29+
path: ~/.nuget/packages
30+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
31+
restore-keys: |
32+
${{ runner.os }}-nuget-
33+
34+
# https://github.com/actions/setup-dotnet
35+
- name: Dotnet Setup
36+
uses: actions/setup-dotnet@v4
37+
with:
38+
dotnet-version: 10.x
39+
40+
- name: Run tests
41+
working-directory: NF.Tool.ReleaseNoteMaker
42+
run: dotnet test --configuration Release --verbosity normal

0 commit comments

Comments
 (0)