-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (34 loc) · 956 Bytes
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Deploy Production
on:
push:
branches:
- "main"
jobs:
build:
runs-on: ubuntu-20.04
name: Build and Deploy to GitHub Pages
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_ENV
- name: Install dependencies
run: pnpm install
- name: Build the project
run: pnpm build --preset github_pages
- name: Generate the static site
run: pnpm generate
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: .output/public