-
Notifications
You must be signed in to change notification settings - Fork 144
51 lines (50 loc) · 1.57 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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
on:
push:
branches-ignore:
- gh-pages
tags:
- "*"
schedule:
- cron: 59 14 * * *
pull_request: null
name: update docs
jobs:
docs:
if: github.event_name != 'schedule' || github.repository == 'planetarium/libplanet'
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
if: github.event_name != 'pull_request'
- uses: actions/checkout@main
if: github.event_name == 'pull_request'
with:
ref: ${{ github.pull_request.head.sha }}
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- run: dotnet build -p:SkipSonar=true
- run: mkdir -p Docs/obj/
- run: Docs/build.ps1
shell: pwsh
- uses: actions/upload-artifact@main
with:
name: docs
path: Docs/_site/
- run: Docs/publish.sh
env:
GHPAGES_SSH_KEY: ${{ secrets.GHPAGES_SSH_KEY }}
if: github.event_name != 'pull_request'
- id: docs-url
run: 'echo ::set-output name=url::"$(cat Docs/obj/url.txt)"'
if: github.event_name != 'pull_request'
- uses: Sibz/[email protected]
with:
authToken: ${{ secrets.GITHUB_TOKEN }}
context: docs
description: Libplanet docs generated by DocFX
state: 'success'
target_url: ${{ steps.docs-url.outputs.url }}
if: github.event_name != 'pull_request'