forked from opensearch-project/opensearch-net
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 996 Bytes
/
build_deploy_docs.yml
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
name: Build & Deploy Docs
on:
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
5.0.x
6.0.x
8.0.x
- uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.?sproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Install docfx
run: dotnet tool install --global docfx
- name: Compile
run: dotnet build -c Release
- name: Generate docs
run: docfx ./docs/docfx.json
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_site/