Skip to content

Commit b9f7c77

Browse files
add static build
1 parent 8a9a9dc commit b9f7c77

File tree

5 files changed

+671
-618
lines changed

5 files changed

+671
-618
lines changed

.github/workflows/main.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
workflow_dispatch:
7+
8+
jobs:
9+
build_site:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Install Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 23
19+
cache: npm
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: build
25+
env:
26+
BASE_PATH: '/${{ github.event.repository.name }}'
27+
# BASE_PATH: ''
28+
NODE_OPTIONS: '--max_old_space_size=9000'
29+
run: |
30+
npm run build
31+
32+
- name: Upload Artifacts
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
# this should match the `pages` option in your adapter-static options
36+
path: 'build/'
37+
38+
deploy:
39+
needs: build_site
40+
runs-on: ubuntu-latest
41+
42+
permissions:
43+
pages: write
44+
id-token: write
45+
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
50+
steps:
51+
- name: Deploy
52+
id: deployment
53+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)