-
Notifications
You must be signed in to change notification settings - Fork 2.1k
142 lines (120 loc) · 4.34 KB
/
Copy pathdocs.yml
File metadata and controls
142 lines (120 loc) · 4.34 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: Documentation
on:
workflow_dispatch:
schedule:
- cron: "0 9 * * *"
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
types:
- checks_requested
permissions:
contents: read
concurrency:
group: docs-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
jobs:
site:
name: Build site
runs-on: ubuntu-latest
timeout-minutes: 30
env:
ORLEANS_DOCS_BUILD_CONCURRENCY: 4
ORLEANS_DOCS_SOURCE_COMMIT: ${{ github.sha }}
steps:
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Test API data generator
run: dotnet test --project docs/tools/PackageJsonGenerator.Tests/PackageJsonGenerator.Tests.csproj --minimum-expected-tests 1
- name: Setup Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: 24.x
cache: npm
cache-dependency-path: docs/site/package-lock.json
- name: Install site dependencies
working-directory: docs/site
run: npm ci --no-audit --no-fund
- name: Generate API data
shell: pwsh
run: ./docs/scripts/Generate-ApiData.ps1 -Parallelism 4
- name: Validate and build site
working-directory: docs/site
run: npm run validate
- name: Upload pull request preview
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: orleans-docs-preview
path: docs/site/dist
retention-days: 3
compression-level: 6
- name: Upload GitHub Pages artifact
if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
with:
path: docs/site/dist
projects:
name: Build documentation projects and samples
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Validate aggregate project policy
working-directory: docs/site
run: node scripts/audit-projects.mjs
- name: Validate snippet and sample policies
shell: pwsh
run: |
./docs/site/src/content/docs/validate-snippets.ps1 -PolicyOnly
./samples/Validate-Samples.ps1 -NoBuild
- name: Build and test documentation projects
run: dotnet test --solution docs/Docs.slnx --configuration Release --framework net10.0 -p:BuildExternalAssets=false -bl:docs-projects.binlog --minimum-expected-tests 1 --max-parallel-test-modules 1
- name: Build samples against local Orleans packages
shell: pwsh
run: ./samples/Build-Samples.ps1 -Configuration Release -NoIncremental -SkipExternalAssets
- name: Upload build diagnostics
if: always()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: documentation-project-binlog
path: docs-projects.binlog
if-no-files-found: ignore
retention-days: 3
deploy:
name: Deploy GitHub Pages
if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
needs:
- site
- projects
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Configure GitHub Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
- name: Deploy
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4