Skip to content

Commit 0fd15bb

Browse files
committed
feat: deploy to github pages
1 parent 15a11fe commit 0fd15bb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/ci.yml

+17
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,14 @@ on:
1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
14+
permissions:
15+
pages: write # to deploy to Pages
16+
id-token: write # to verify the deployment originates from an appropriate source
17+
1418
steps:
1519
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
20+
with:
21+
fetch-depth: 0 # to fetch all history
1622

1723
- name: Setup pnpm
1824
uses: pnpm/action-setup@v2.4.0
@@ -34,3 +40,14 @@ jobs:
3440
3541
- name: Test
3642
run: pnpm test
43+
44+
- name: Upload pages artifacts
45+
# https://github.com/actions/upload-pages-artifact
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: 'examples/vite/dist'
49+
50+
- name: Deploy to GitHub Pages
51+
if: github.ref == 'refs/heads/main'
52+
# https://github.com/actions/deploy-pages
53+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)