Skip to content

Commit cf1acfe

Browse files
kailunkailun
authored andcommitted
ci: add GitHub Actions workflow for auto-deploy to GitHub Pages
1 parent 5248212 commit cf1acfe

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 18
20+
cache: npm
21+
22+
- run: npm ci
23+
24+
- name: Create entry shim for webpack
25+
run: echo 'export { default } from "./src/index";' > index.js
26+
27+
- name: Build examples and deploy
28+
run: npx rc-tools run gh-pages
29+
env:
30+
NODE_OPTIONS: --openssl-legacy-provider
31+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)