Skip to content

Commit 277fa72

Browse files
committed
fix: Correct job names in typedoc workflow to resolve deployment issues
1 parent 4a016e7 commit 277fa72

File tree

4 files changed

+527
-503
lines changed

4 files changed

+527
-503
lines changed

.github/workflows/typedoc.yml

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: TypeDoc
22

33
on:
4-
pull_request:
5-
types: [opened, edited, reopened, synchronize]
4+
push:
5+
branches:
6+
- main
67

78
permissions:
89
contents: read
@@ -11,37 +12,39 @@ permissions:
1112

1213
# Allow only one concurrent deployment
1314
concurrency:
14-
group: "pages"
15+
group: "typedoc"
1516
cancel-in-progress: true
1617

1718
jobs:
18-
"Generate TypeDoc":
19+
build:
20+
name: "Generate TypeDoc"
1921
runs-on: ubuntu-latest
2022
steps:
2123
- name: Checkout
2224
uses: actions/checkout@v4
23-
24-
- name: Setup Pages
25-
uses: actions/configure-pages@v4
2625

2726
- name: Install
2827
uses: ./.github/composite-actions/install
2928

30-
- name: Generate Documentation
29+
- name: Run TypeDoc
3130
run: pnpm typedoc
32-
33-
- name: Upload artifact
34-
uses: actions/upload-pages-artifact@v3
35-
with:
36-
path: './typedoc/documentation.json'
3731

38-
"Deploy TypeDoc":
39-
environment:
40-
name: github-pages
41-
url: ${{ steps.deployment.outputs.page_url }}
42-
runs-on: ubuntu-latest
43-
needs: build
44-
steps:
45-
- name: Deploy to GitHub Pages
46-
id: deployment
47-
uses: actions/deploy-pages@v4
32+
- name: Update Gist
33+
uses: actions/github-script@v7
34+
with:
35+
github-token: ${{ secrets.GIST_TOKEN }}
36+
script: |
37+
const fs = require('fs');
38+
const content = fs.readFileSync('./packages/thirdweb/typedoc/parsed.json', 'utf8');
39+
const gistId = '678fe1f331a01270bb002fee660f285d';
40+
41+
await github.rest.gists.update({
42+
gist_id: gistId,
43+
files: {
44+
'data.json': {
45+
content: content
46+
}
47+
}
48+
});
49+
50+
console.log(`Permalink: https://gist.githubusercontent.com/raw/${gistId}/data.json`);

0 commit comments

Comments
 (0)