Skip to content

Commit 5631fb1

Browse files
authored
Create github-pages
1 parent c549341 commit 5631fb1

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/github-pages

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Set a branch name to trigger deployment
7+
pull_request:
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-22.04
12+
permissions:
13+
contents: write
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
submodules: true # Fetch Hugo themes (true OR recursive)
20+
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
21+
22+
- name: Set up Node.js
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: '20'
26+
27+
- name: Install pnpm
28+
run: npm install -g pnpm
29+
30+
- name: Build
31+
run: pnpm docs:build
32+
33+
- name: Deploy
34+
uses: peaceiris/actions-gh-pages@v4
35+
# If you're changing the branch from main,
36+
# also change the `main` in `refs/heads/main`
37+
# below accordingly.
38+
if: github.ref == 'refs/heads/main'
39+
with:
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
publish_dir: ./docs-public

0 commit comments

Comments
 (0)