Skip to content

Commit

Permalink
Docs: 更新部署文档说明
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Nov 12, 2024
1 parent fc653be commit 610ca4d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ When your site is ready to deploy, run the following command:
hugo
```

### Deploy to GitHub Pages

1. Head to Setting => Actions => General => Workflow permissions => Check "Read and write permissions".
2. Manually run Workflow: Actions => Hugo build and deploy => Click Run workflow button.
3. GitHub Pages settings: Setting => Pages => Source: Deploy from a branch => Branch: `gh-pages` => Save.

> Only need to manually run the Workflow the first time you deploy, and it will be automatically deployed every time you push to the `main` branch.

### Update theme

Afterwards you can upgrade the theme with the following command:
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ hugo server -e production
hugo
```

### 部署到 GitHub Pages

1. 转到 Setting => Actions => General => Workflow permissions => 选中 "Read and write permissions"
2. 手动运行 Workflow: Actions => Hugo build and deploy => 点击 Run workflow 按钮。
3. GitHub Pages 设置:Setting => Pages => Source: Deploy from a branch => Branch: `gh-pages` => Save。

> 只有第一次部署时需要手动运行 Workflow,之后每次推送到 `main` 分支都会自动部署。

### 更新主题

之后,你可以使用以下命令升级主题:
Expand Down
8 changes: 8 additions & 0 deletions content/posts/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ When your site is ready to deploy, run the following command:
hugo
```

### Deploy to GitHub Pages

1. Head to Setting => Actions => General => Workflow permissions => Check "Read and write permissions".
2. Manually run Workflow: Actions => Hugo build and deploy => Click Run workflow button.
3. GitHub Pages settings: Setting => Pages => Source: Deploy from a branch => Branch: `gh-pages` => Save.

> Only need to manually run the Workflow the first time you deploy, and it will be automatically deployed every time you push to the `main` branch.

### Update theme

Afterwards you can upgrade the theme with the following command:
Expand Down

0 comments on commit 610ca4d

Please sign in to comment.