Skip to content

Commit

Permalink
docs: cloudflare pages deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Oct 15, 2024
1 parent 6db8d34 commit 03eafdc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion content/docs/deployment/cloudflare-pages/codes/workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```yaml
```yaml {data-max-lines=30}
name: Cloudflare Pages
on:
Expand All @@ -12,6 +12,7 @@ on:
jobs:
publish:
# Must runs on Ubuntu, since this workflow use snap to install Dart Sass.
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -26,6 +27,9 @@ jobs:
with:
node-version: "19"
- name: Setup Dart Sass
run: sudo snap install dart-sass && sudo snap alias dart-sass sass
- name: Cache dependencies
uses: actions/cache@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions content/docs/deployment/cloudflare-pages/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ There are multiple ways to deploy you sites on Cloudflare Pages.
1. Framework preset: Hugo.
1. Build command: it depends on how you install the build tools, for [starter theme](https://github.com/hbstack/theme): `npm ci && hugo --gc --minify --enableGitInfo`.
1. Build output directory: `/public`.
1. **Make sure the `Build system version` was `2`, it's required to install Dart Sass.**
1. Environment variables:
1. `HUGO_VERSION`: i.e. `0.111.3`.
1. `NODE_VERSION`: any version large than `16`, e.g `19`.
1. `EMBEDDED_DART_SASS_VERSION`: Embedded Dart Sass, i.e. `1.62.1`.

## Deploy Sites via GitHub Cloudflare Pages Actions

Expand Down
2 changes: 2 additions & 0 deletions content/docs/deployment/cloudflare-pages/index.zh-hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ authors:
1. 框架预设置:Hugo。
1. 构建命令:其取决于你如何安装构建工具,对于[新手主题](https://github.com/hbstack/theme)`npm ci && hugo --gc --minify --enableGitInfo`
1. 构建输出目录:`/public`
1. **确保 `Build system version``2`,否则无法安装 Dart Sass。**
1. 环境变量:
1. `HUGO_VERSION`:比如 `0.111.3`
1. `NODE_VERSION`:任意大于 `16` 的版本,如:`19`
1. `EMBEDDED_DART_SASS_VERSION`:Embedded Dart Sass,如:`1.62.1`

## 通过 GitHub Cloudflare Pages Actions 部署站点

Expand Down
2 changes: 2 additions & 0 deletions content/docs/deployment/cloudflare-pages/index.zh-hant.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ authors:
1. 框架預設置:Hugo。
1. 構建命令:其取決於你如何安裝構建工具,對於[新手主題](https://github.com/hbstack/theme)`npm ci && hugo --gc --minify --enableGitInfo`
1. 構建輸出目錄:`/public`
1. **確保 `Build system version``2`,否則無法安裝 Dart Sass。**
1. 環境變量:
1. `HUGO_VERSION`:比如 `0.111.3`
1. `NODE_VERSION`:任意大於 `16` 的版本,如:`19`
1. `EMBEDDED_DART_SASS_VERSION`:Embedded Dart Sass,如:`1.62.1`

## 通過 GitHub Cloudflare Pages Actions 部署站點

Expand Down

0 comments on commit 03eafdc

Please sign in to comment.