generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 57
115 lines (95 loc) · 3.7 KB
/
docs-publish.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
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
# Workflow that deploys project documentation to GitHub Pages
name: Build and Deploy Docs
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Automatically triggers when a new release is published
workflow_run:
workflows: ["Release to NPM Registry"]
types:
- completed
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
permissions:
contents: write # to write documentation files to the repo
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
# https://cashapp.github.io/hermit/usage/ci/
- name: Init Hermit
uses: cashapp/activate-hermit@v1
with:
cache: "true"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build all workspace packages
run: pnpm --recursive --stream build
- name: TBDocs Reporter
id: tbdocs-reporter-protocol
uses: TBD54566975/tbdocs@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
fail_on_error: true
group_docs: true
entry_points: |
- file: packages/api/src/index.ts
docsReporter: typedoc
docsGenerator: typedoc-html
readmeFile: packages/api/README.md
- file: packages/crypto/src/index.ts
docsReporter: typedoc
docsGenerator: typedoc-html
readmeFile: packages/crypto/README.md
- file: packages/crypto-aws-kms/src/index.ts
docsReporter: typedoc
docsGenerator: typedoc-html
readmeFile: packages/crypto-aws-kms/README.md
- file: packages/dids/src/index.ts
docsReporter: typedoc
docsGenerator: typedoc-html
readmeFile: packages/dids/README.md
- file: packages/credentials/src/index.ts
docsReporter: typedoc
docsGenerator: typedoc-html
readmeFile: packages/credentials/README.md
- name: Upload documentation artifacts
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 #v4.3.1
with:
name: tbdocs-output
path: ./.tbdocs
deploy:
# Add a dependency to the build job
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
contents: read # to read from project repo
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- name: Setup Pages
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d #v4.0.0
- name: Download TBDocs Artifacts
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 #v4.1.4
with:
name: tbdocs-output
path: ./tbdocs
- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa #v3.0.1
with:
path: "./tbdocs/docs"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@decdde0ac072f6dcbe43649d82d9c635fff5b4e4 #v4.0.4