-
Notifications
You must be signed in to change notification settings - Fork 4
68 lines (58 loc) · 1.4 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build docs
on:
push:
branches:
- main
- release/**
tags:
- '*'
pull_request:
branches: [main]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Build docs
shell: pwsh
run: |
./build-docs.ps1 -Output ./artifacts/gh-pages -CurrentBranch $Env:GITHUB_REF_NAME
- name: Publish build artifacts
uses: actions/upload-artifact@v2
with:
name: Docs
path: |
./artifacts/gh-pages
deploy:
runs-on: ubuntu-latest
needs: build
concurrency: ci-${{ github.ref }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/download-artifact@v2
with:
name: Docs
path: docs
- run: ls -la ./docs
- name: Deploy 🚀
uses: JamesIves/[email protected]
if: github.ref_name == 'main' || startsWith(github.ref, 'refs/tags/')
with:
branch: gh-pages
folder: ./docs
commit-message: ${{github.ref_name}}
clean: true