Skip to content

Commit ade873f

Browse files
committed
Fix GitHub Actions workflow and add automated bundling
- Fixed YAML syntax errors in workflow - Changed from yarn to npm for consistency - Added logo copying steps to ensure assets are available - Added automated single HTML bundle creation - Updated Node.js setup for better caching
1 parent ce0b74f commit ade873f

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/website.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
defaults:
2929
run:
3030
working-directory: ./website
31+
3132
steps:
3233
- name: Checkout
3334
uses: actions/checkout@v4
@@ -36,34 +37,35 @@ jobs:
3637
- name: Setup Node
3738
uses: actions/setup-node@v4
3839
with:
39-
node-version: latest
40+
node-version: 20
41+
cache: 'npm'
4042
- name: Setup Pages
4143
uses: actions/configure-pages@v5
4244
- name: Install dependencies
43-
run: yarn install --frozen-lockfile
45+
run: npm install
4446
- name: Copy logo to docs assets
4547
run: |
4648
mkdir -p docs/assets
4749
cp ../assets/logo.png docs/assets/
4850
- name: Build with VitePress
4951
run: |
50-
yarn build
52+
npm run build
5153
touch docs/.vitepress/dist/.nojekyll
5254
- name: Ensure logo is in build output
5355
run: |
5456
mkdir -p docs/.vitepress/dist/assets
5557
cp ../assets/logo.png docs/.vitepress/dist/assets/
5658
- name: Create single HTML bundle
57-
run: yarn bundle
58-
- name: Upload artifact
59+
run: npm run bundle
60+
- name: Upload artifact for GitHub Pages
5961
uses: actions/upload-pages-artifact@v3
6062
with:
61-
path: website/docs/.vitepress/dist
62-
- name: Upload single HTML artifact
63+
path: ./website/docs/.vitepress/dist
64+
- name: Upload single HTML bundle artifact
6365
uses: actions/upload-artifact@v4
6466
with:
6567
name: single-html-bundle
66-
path: website/dist-single/index.html
68+
path: ./website/dist-single/index.html
6769
retention-days: 30
6870

6971
# Deployment job

0 commit comments

Comments
 (0)