Skip to content

Commit 64414be

Browse files
authored
deploy to github.io (#1)
1 parent 2da1da9 commit 64414be

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: 20.x
22+
23+
- name: Install dependencies
24+
run: |
25+
npm i -g pnpm
26+
pnpm i
27+
28+
- name: Build
29+
run: pnpm run build
30+
31+
- name: Upload artifact
32+
uses: actions/upload-pages-artifact@v1
33+
with:
34+
path: .vitepress/dist
35+
36+
deploy:
37+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
runs-on: ubuntu-latest
42+
needs: build
43+
steps:
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
node_modules
33
pnpm-lock.yaml
44
.vitepress/cache
5+
.vitepress/dist

0 commit comments

Comments
 (0)