-
Notifications
You must be signed in to change notification settings - Fork 56
75 lines (63 loc) · 1.78 KB
/
docs.yaml
File metadata and controls
75 lines (63 loc) · 1.78 KB
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
69
70
71
72
73
74
75
name: Docs
on:
push:
branches: [main]
paths:
- 'src/**'
- 'docs/**'
- 'docfx/**'
- '.github/workflows/docs.yaml'
pull_request:
branches: [main]
paths:
- 'src/**'
- 'docs/**'
- 'docfx/**'
- '.github/workflows/docs.yaml'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
env:
DOTNET_VERSION: '9'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install DocFX
run: dotnet tool install -g docfx
- name: Restore + build solution (needed for metadata + CLI emitter)
run: dotnet build fhir-codegen.sln -c Release
- name: Generate CLI Markdown into docs content path
run: |
dotnet run --no-build --configuration Release \
--project src/fhir-codegen/fhir-codegen.csproj -- \
docs cli --output docs/articles/cli.md
- name: Build site
run: docfx ./docfx/docfx.json --warningsAsErrors
- name: Configure Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/configure-pages@v5
- name: Upload Pages artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: docfx/_site
deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4