Skip to content

Commit c4beda4

Browse files
committed
Add docs website publishing workflow
1 parent ceb7b00 commit c4beda4

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Update docs website
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
7+
jobs:
8+
9+
# This job builds the documentation website
10+
# and the commits that to the master branch,
11+
# which will result in replacing the currently published site
12+
13+
build_and_commit:
14+
name: Build & commit docs website
15+
runs-on: ubuntu-slim
16+
17+
env:
18+
DotnetVersion: 8.0.x
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
- name: Add .NET global tools location to PATH
24+
run: echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
25+
- name: Install .NET
26+
uses: actions/setup-dotnet@v4
27+
with:
28+
dotnet-version: ${{ env.DotnetVersion }}
29+
- name: Install DocFX
30+
run: dotnet tool install --global docfx
31+
- name: Remove old docs
32+
run: dotnet clean CSF.Extensions.WebDriver.Docs
33+
- name: Build new docs
34+
working-directory: CSF.Extensions.WebDriver.Docs
35+
run: docfx docfx.json
36+
- name: Add & Commit
37+
uses: EndBug/add-and-commit@v9.1.4
38+
with:
39+
add: -A docs/
40+
default_author: github_actor
41+
committer_name: Github Actions Workflow (bot)
42+
committer_email: github-actions-workflow@bots.noreply.github.com
43+
fetch: true
44+
message: Publish updated documentation website
45+
push: origin master
46+
47+

0 commit comments

Comments
 (0)