Skip to content

Commit 4f848ff

Browse files
committed
update workflows
1 parent 1ad9b03 commit 4f848ff

File tree

2 files changed

+52
-24
lines changed

2 files changed

+52
-24
lines changed

.github/workflows/docs.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Publish Docs to GitHub Pages
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Setup Bun
19+
uses: oven-sh/setup-bun@v1
20+
with:
21+
bun-version: latest
22+
23+
- name: Setup Node
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: "20.x"
27+
registry-url: "https://registry.npmjs.org"
28+
29+
- name: Install Dependencies
30+
run: bun install
31+
32+
- name: Build BinaryStream
33+
run: bun run build
34+
35+
- name: Build Docs
36+
run: bun run docs
37+
38+
- name: Upload Docs to GitHub Pages
39+
uses: actions/upload-pages-artifact@v3
40+
with:
41+
path: docs/
42+
deploy:
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
runs-on: ubuntu-latest
47+
needs: build
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

.github/workflows/publish.yml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1-
name: Publish to NPM and GitHub Pages
1+
name: Publish to NPM
22

33
on:
44
release:
55
types: [created]
66

77
permissions:
88
contents: read
9-
pages: write
109
id-token: write
1110

12-
concurrency:
13-
group: "pages"
14-
cancel-in-progress: false
15-
1611
jobs:
1712
build:
1813
runs-on: ubuntu-latest
@@ -40,21 +35,3 @@ jobs:
4035
run: npm publish --provenance --access public
4136
env:
4237
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
43-
44-
- name: Build Docs
45-
run: bun run docs
46-
47-
- name: Upload Docs to GitHub Pages
48-
uses: actions/upload-pages-artifact@v3
49-
with:
50-
path: docs/
51-
deploy:
52-
environment:
53-
name: github-pages
54-
url: ${{ steps.deployment.outputs.page_url }}
55-
runs-on: ubuntu-latest
56-
needs: build
57-
steps:
58-
- name: Deploy to GitHub Pages
59-
id: deployment
60-
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)