-
Notifications
You must be signed in to change notification settings - Fork 2.1k
135 lines (115 loc) · 3.73 KB
/
Copy pathdocs.yml
File metadata and controls
135 lines (115 loc) · 3.73 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
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.ref == 'refs/heads/main' && github.sha || 'main' }}
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: 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
snippets:
name: Build documentation snippets
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Build snippets
shell: pwsh
run: ./docs/site/src/content/docs/validate-snippets.ps1
samples:
name: Build samples
runs-on: ubuntu-latest
timeout-minutes: 30
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 and build samples
shell: pwsh
run: ./samples/Validate-Samples.ps1
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
- snippets
- samples
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