-
-
Notifications
You must be signed in to change notification settings - Fork 43
65 lines (51 loc) · 1.54 KB
/
Copy pathpublish-docs.yml
File metadata and controls
65 lines (51 loc) · 1.54 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
name: Docs build and deploy
run-name: Docs build and deploy
on:
workflow_dispatch:
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
jobs:
deploy:
name: Build and deploy docs to Cloudflare Pages
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install .NET 9.0.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Install .NET 10.0.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Build DocSamples
run: dotnet build src/DocSamples/DocSamples.csproj -c Release
- name: Install mdsnippets
run: dotnet tool install -g MarkdownSnippets.Tool
- name: Run mdsnippets
run: mdsnippets
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install npm dependencies
run: npm ci
- name: Build VitePress site
run: npx vitepress build docs
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
packageManager: npm
command: pages deploy docs/.vitepress/dist --project-name=jasperfx-weasel --branch=master