Skip to content

Commit a349bfb

Browse files
committed
add github pages workflow
1 parent a642071 commit a349bfb

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/gh-pages.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
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+
- name: Checkout
18+
uses: actions/checkout@v4
19+
- uses: pnpm/action-setup@v3
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
cache: 'pnpm'
24+
- name: Setup Pages
25+
uses: actions/configure-pages@v5
26+
with:
27+
static_site_generator: gatsby
28+
- name: Install dependencies
29+
run: pnpm install --frozen-lockfile
30+
- name: Lint
31+
run: pnpm run lint
32+
- name: Build
33+
run: pnpm run build
34+
- name: Upload artifact
35+
uses: actions/upload-pages-artifact@v3
36+
with:
37+
path: ./public
38+
39+
deploy:
40+
needs: build
41+
environment:
42+
name: github-pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)