Skip to content

Commit 46b150a

Browse files
committed
add github ci
1 parent 92f07fe commit 46b150a

File tree

3 files changed

+74
-11
lines changed

3 files changed

+74
-11
lines changed

.github/workflows/page.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Build Hugo site and push to page branch
2+
name: Build Hugo Site
3+
4+
on:
5+
push:
6+
branches: ["main"]
7+
pull_request:
8+
branches: ["main"]
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
env:
22+
HUGO_VERSION: 0.154.1
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Setup Go
30+
uses: actions/setup-go@v5
31+
with:
32+
go-version: '1.25'
33+
34+
- name: Setup Node.js
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: '24'
38+
39+
- name: Install npm dependencies
40+
run: npm ci --prefer-offline --no-audit
41+
42+
- name: Setup Hugo
43+
run: |
44+
wget -q -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
45+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
46+
47+
- name: Build with Hugo
48+
env:
49+
HUGO_ENVIRONMENT: production
50+
HUGO_ENV: production
51+
run: hugo --gc --minify
52+
53+
- name: Deploy to page branch
54+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
55+
uses: peaceiris/actions-gh-pages@v4
56+
with:
57+
github_token: ${{ secrets.GITHUB_TOKEN }}
58+
publish_branch: page
59+
publish_dir: ./public
60+
force_orphan: true
61+
user_name: 'github-actions[bot]'
62+
user_email: 'github-actions[bot]@users.noreply.github.com'
63+
commit_message: 'deploy: ${{ github.sha }}'

content/docs/tutorial/_index.zh.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ sidebar_expanded: true
2222

2323
## 主题
2424

25-
| 主题 | 描述 |
26-
|------|------|
27-
| [安装](/docs/tutorial/install/) | 在全新服务器上安装 Piglet Run |
28-
| [快速开始](/docs/tutorial/quickstart/) | Piglet Run 的前 5 分钟 |
29-
| [VS Code](/docs/tutorial/vscode/) | 网页版 VS Code 教程 |
30-
| [Jupyter](/docs/tutorial/jupyter/) | 数据科学的 JupyterLab |
31-
| [Claude Code](/docs/tutorial/claude/) | 使用 Claude 进行 AI 编码 |
32-
| [数据库](/docs/tutorial/database/) | PostgreSQL 基础 |
33-
| [应用](/docs/tutorial/application/) | 构建和部署应用 |
25+
| 主题 | 描述 |
26+
|---------------------------------------|----------------------|
27+
| [安装](/docs/tutorial/install/) | 在全新服务器上安装 Piglet Run |
28+
| [快速开始](/docs/tutorial/quickstart/) | Piglet Run 的前 5 分钟 |
29+
| [VS Code](/docs/tutorial/vscode/) | 网页版 VS Code 教程 |
30+
| [Jupyter](/docs/tutorial/jupyter/) | 数据科学的 JupyterLab |
31+
| [Claude Code](/docs/tutorial/claude/) | 使用 Claude 进行 AI 编码 |
32+
| [数据库](/docs/tutorial/database/) | PostgreSQL 基础 |
33+
| [应用](/docs/tutorial/application/) | 构建和部署应用 |
3434

3535
/Users/vonng/pgsty/piglet.run/static/img/logo/piglet.png

hugo.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ languages:
1818
languageName: English
1919
weight: 1
2020
params:
21-
description: 'Piglet Run - PostgreSQL Cloud Environment Provisioning Service'
21+
description: 'Piglet Run - PostgreSQL Centric AI Runtime'
2222
time_format_blog: 'January 02, 2006'
2323
menu:
2424
main:
@@ -38,7 +38,7 @@ languages:
3838
languageName: 中文
3939
weight: 2
4040
params:
41-
description: 'Piglet Run - PostgreSQL 云端环境配置服务'
41+
description: 'Piglet Run - PostgreSQL 为中心的 AI 运行时'
4242
time_format_blog: '2006年01月02日'
4343
menu:
4444
main:

0 commit comments

Comments
 (0)