Skip to content

Commit 1e697af

Browse files
committed
add github pages workflow
1 parent 426b8ad commit 1e697af

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@master
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Use Node.js 22.x
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: 22.x
22+
23+
- run: git branch -D ghpages
24+
continue-on-error: true
25+
26+
- run: git checkout -b ghpages
27+
- run: rm .gitignore
28+
- run: mv .gitignore.ghpages .gitignore
29+
- run: npm ci
30+
- run: npm run build
31+
- run: git config user.name github-actions
32+
- run: git config user.email github-actions@github.com
33+
- run: git describe --tags --match v* > build/version.txt
34+
- run: git add -A
35+
- run: git commit -m "build GitHub Pages"
36+
- run: git push -f origin ghpages

.gitignore.ghpages

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/node_modules/
2+
/temp/
3+
/glyphs/
4+
/package-lock.json

0 commit comments

Comments
 (0)