Skip to content

Commit 3921ce3

Browse files
committed
feat: Implement deploy-docs workflow for GitHub Pages deployment
1 parent c3491df commit 3921ce3

File tree

3 files changed

+59
-45
lines changed

3 files changed

+59
-45
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
29+
- run: corepack enable
30+
31+
- name: Install dependencies
32+
run: yarn install --immutable
33+
34+
- name: Build docs
35+
run: yarn docs:build
36+
37+
- name: Setup Pages
38+
uses: actions/configure-pages@v4
39+
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: docs/.vitepress/dist
44+
45+
deploy:
46+
needs: build
47+
runs-on: ubuntu-latest
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

.github/workflows/publish.yml

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -57,41 +57,3 @@ jobs:
5757
lib-wasm-py-libdggrid.js
5858
lib-wasm-py-libdggrid.wasm
5959
60-
deploy-docs:
61-
needs: build-publish-release
62-
runs-on: ubuntu-latest
63-
permissions:
64-
contents: read
65-
pages: write
66-
id-token: write
67-
environment:
68-
name: github-pages
69-
url: ${{ steps.deployment.outputs.page_url }}
70-
steps:
71-
- uses: actions/checkout@v4
72-
with:
73-
fetch-depth: 0
74-
75-
- uses: actions/setup-node@v4
76-
with:
77-
node-version: 20
78-
79-
- run: corepack enable
80-
81-
- name: Install dependencies
82-
run: yarn install --immutable
83-
84-
- name: Build docs
85-
run: yarn docs:build
86-
87-
- name: Setup Pages
88-
uses: actions/configure-pages@v4
89-
90-
- name: Upload artifact
91-
uses: actions/upload-pages-artifact@v3
92-
with:
93-
path: docs/.vitepress/dist
94-
95-
- name: Deploy to GitHub Pages
96-
id: deployment
97-
uses: actions/deploy-pages@v4

readme.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ A WebAssembly wrapper for [DGGRID](https://github.com/sahrk/DGGRID), the C++ lib
66
<div align="center">
77

88
[![NPM Version](https://img.shields.io/npm/v/webdggrid?style=flat-square)](https://www.npmjs.com/package/webdggrid)
9-
10-
[![Docs](https://img.shields.io/github/actions/workflow/status/am2222/webDggrid/publish.yml?style=flat-square&label=docs)](https://am2222.github.io/webDggrid/)
11-
12-
[![Tests](https://img.shields.io/github/actions/workflow/status/am2222/webDggrid/pr-check.yml?style=flat-square&label=ci)](https://github.com/am2222/webDggrid/actions/workflows/pr-check.yml)
13-
14-
15-
[![JS DEliver](https://data.jsdelivr.com/v1/package/npm/webdggrid/badge)](https://www.jsdelivr.com/package/npm/webdggrid)
9+
[![GitHub Release](https://img.shields.io/github/v/release/am2222/webDggrid?style=flat-square)](https://github.com/am2222/webDggrid/releases/latest)
10+
[![Docs](https://img.shields.io/github/actions/workflow/status/am2222/webDggrid/deploy-docs.yml?style=flat-square&label=docs)](https://am2222.github.io/webDggrid/)
11+
[![PR Check](https://img.shields.io/github/actions/workflow/status/am2222/webDggrid/pr-check.yml?style=flat-square&label=pr%20check)](https://github.com/am2222/webDggrid/actions/workflows/pr-check.yml)
12+
[![Publish](https://img.shields.io/github/actions/workflow/status/am2222/webDggrid/publish.yml?style=flat-square&label=publish)](https://github.com/am2222/webDggrid/actions/workflows/publish.yml)
13+
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/webdggrid/badge)](https://www.jsdelivr.com/package/npm/webdggrid)
1614

1715
</div>
1816

0 commit comments

Comments
 (0)