-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (36 loc) · 1.15 KB
/
Copy pathdeploy-to-gh-pages.yml
File metadata and controls
44 lines (36 loc) · 1.15 KB
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 to GitHub Pages
on:
workflow_dispatch:
push:
branches: [main]
jobs:
Deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4.2.0
with:
registry-url: 'https://registry.npmjs.org'
node-version: 20.x
cache: 'pnpm'
- name: Clear hosted tool-cache for corepack
# See: [actions/setup-node/issues/1222](https://github.com/actions/setup-node/issues/1222#issuecomment-2673608477)
if: runner.os == 'Windows'
run: Remove-Item -Recurse -Force (Get-Command corepack.cmd).Path
shell: pwsh
- name: Install Corepack
# See: [actions/setup-node/issues/1222](https://github.com/actions/setup-node/issues/1222)
run: npm i -g --force corepack && corepack enable && pnpm i
shell: bash
- name: Build
run: |
pnpm b
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: .vitepress/dist