From b01b5b47af936594d7d9fd0069a40aa86f4e92b8 Mon Sep 17 00:00:00 2001 From: Shane <6071159+smashedr@users.noreply.github.com> Date: Thu, 27 Nov 2025 22:45:40 -0800 Subject: [PATCH 1/2] Update Docs --- .github/workflows/dev.yaml | 2 +- README.md | 1 + docs/examples.md | 12 ++++++++++++ docs/index.md | 5 +++-- docs/usage.md | 38 ++++++++++++++++++++++++++------------ 5 files changed, 43 insertions(+), 15 deletions(-) diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml index 32ea91d..85b8542 100644 --- a/.github/workflows/dev.yaml +++ b/.github/workflows/dev.yaml @@ -26,7 +26,7 @@ jobs: #prepare: 'sed -i "s/>ZensicalZensical ${ZENSICAL_VERSION}Zensical<\/a>/>Zensical<\/a> v${ZENSICAL_VERSION}/" zensical.toml &&\ - sed -i "s/Zensical Action Docs/Zensical Action Docs Preview/" zensical.toml + sed -i "s/Zensical Action Docs/Zensical Action Docs #${GITHUB_RUN_NUMBER}/" zensical.toml deploy: name: "Deploy" diff --git a/README.md b/README.md index acfd3f3..ae5752b 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,7 @@ Additionally, you can support other [GitHub Actions](https://actions.cssnr.com/) - [Mirror Repository Action](https://github.com/cssnr/mirror-repository-action?tab=readme-ov-file#readme) - [Update Version Tags Action](https://github.com/cssnr/update-version-tags-action?tab=readme-ov-file#readme) - [Docker Tags Action](https://github.com/cssnr/docker-tags-action?tab=readme-ov-file#readme) +- [TOML Action](https://github.com/cssnr/toml-action?tab=readme-ov-file#readme) - [Update JSON Value Action](https://github.com/cssnr/update-json-value-action?tab=readme-ov-file#readme) - [JSON Key Value Check Action](https://github.com/cssnr/json-key-value-check-action?tab=readme-ov-file#readme) - [Parse Issue Form Action](https://github.com/cssnr/parse-issue-form-action?tab=readme-ov-file#readme) diff --git a/docs/examples.md b/docs/examples.md index dbb24e2..0daca4d 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -123,6 +123,17 @@ jobs: tree "${{ steps.zensical.outputs.path }}" ``` + +
Install Project and Run Prepare + +```yaml +- name: Zensical Action + uses: cssnr/zensical-action@v1 + with: + project: true + prepare: 'sed -i "s/>Zensical<\/a>/>Zensical<\/a> v${ZENSICAL_VERSION}/" zensical.toml' +``` +
For more examples, you can check out other projects using this action: @@ -136,3 +147,4 @@ Example repositories using this action to deploy to GitHub Pages. | :-------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------: | :-------------------------------------------------------------- | | [cssnr/zensical-action-docs](https://github.com/cssnr/zensical-action-docs) | [docs.yaml](https://github.com/cssnr/zensical-action-docs/blob/master/.github/workflows/docs.yaml) | [dev.yaml](https://github.com/cssnr/zensical-action-docs/blob/master/.github/workflows/dev.yaml) | [zensical-action.cssnr.com](https://zensical-action.cssnr.com/) | | [cssnr/actions-tools](https://github.com/cssnr/actions-tools) | [docs.yaml](https://github.com/cssnr/actions-tools/blob/master/.github/workflows/docs.yaml) | [dev.yaml](https://github.com/cssnr/actions-tools/blob/master/.github/workflows/dev.yaml) | [actions-tools.cssnr.com](https://actions-tools.cssnr.com/) | +| [cssnr/zipline-cli](https://github.com/cssnr/zipline-cli) | [docs.yaml](https://github.com/cssnr/zipline-cli/blob/master/.github/workflows/docs.yaml) | [dev.yaml](https://github.com/cssnr/zipline-cli/blob/master/.github/workflows/dev.yaml) | [zipline-cli.cssnr.com](https://zipline-cli.cssnr.com/) | diff --git a/docs/index.md b/docs/index.md index f0308e7..f72ce13 100644 --- a/docs/index.md +++ b/docs/index.md @@ -28,8 +28,9 @@ Zensical GitHub Action to checkout, build, upload, and deploy [Zensical Docs](ht ## Features - Build Documentation -- Upload Artifact -- Deploy to Pages +- Upload the Artifact +- Deploy to GitHub Pages +- Run Prepare/Post Scripts You can customize or disable each step with the [Inputs](usage.md#inputs). diff --git a/docs/usage.md b/docs/usage.md index 159a520..aa0b91a 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -16,18 +16,20 @@ The [Outputs](#outputs) include the `page_url` and more. **All Inputs are Optional.** -| Input | Default Value | Description of the Input | -| :----------------- | :----------------: | :----------------------------------------------------------------------------------------------- | -| **version** | _Latest_ | Zensical Version | -| **python-version** | _Default_ | Python Version (see [setup-uv](https://github.com/astral-sh/setup-uv?tab=readme-ov-file#inputs)) | -| **uv-version** | _Latest_ | UV Version (see [setup-uv](https://github.com/astral-sh/setup-uv?tab=readme-ov-file#inputs)) | -| **directory** | `.` | Build Directory (relative to root) | -| **path** | `site` | Site Path (relative to root) | -| **checkout** | `true` | Runs: [actions/checkout](https://github.com/actions/checkout) | -| [upload](#upload) | `github-pages` | Upload: [`github-pages`,`artifact`,`false`] | -| [name](#name) | `artifact` | Artifact Name if [upload](#upload) is `artifact` | -| [deploy](#deploy) | `true` | Deploy to Pages (see [deploy](#deploy)) | -| **summary** | `true` | Add Job Summary to Workflow | +| Input | Default Value | Description of the Input | +| :---------------------- | :----------------: | :----------------------------------------------------------------------------------------------- | +| **version** | _Latest_ | Zensical Version | +| **python-version** | _Default_ | Python Version (see [setup-uv](https://github.com/astral-sh/setup-uv?tab=readme-ov-file#inputs)) | +| **uv-version** | _Latest_ | UV Version (see [setup-uv](https://github.com/astral-sh/setup-uv?tab=readme-ov-file#inputs)) | +| **directory** | `.` | Build Directory (relative to root) | +| **path** | `site` | Site Path (relative to root) | +| **checkout** | `true` | Runs: [actions/checkout](https://github.com/actions/checkout) | +| [upload](#upload) | `github-pages` | Upload: [`github-pages`,`artifact`,`false`] | +| [name](#name) | `artifact` | Artifact Name if [upload](#upload) is `artifact` | +| [deploy](#deploy) | `true` | Deploy to Pages (see [deploy](#deploy)) | +| [prepare](#preparepost) | - | Prepare script (before build) | +| [post](#preparepost) | - | Post script (after build) | +| **summary** | `true` | Add Job Summary to Workflow | ### upload @@ -50,6 +52,18 @@ If you set [upload](#upload) to anything except `github-pages` this step will be Default: `true` +#### prepare/post + +Prepare runs after install but before build. Post runs after the build. + +The paths are relative to the specified `directory`. + +Additional Environment Variables available in these scripts. + +| Variable | Description | +| ------------------ | --------------------- | +| `ZENSICAL_VERSION` | Zensical Version Used | + ## Permissions If you are deploying to GitHub Pages you need these permissions. From b785a801bf875a9bc494d3357ec3b09665abc012 Mon Sep 17 00:00:00 2001 From: Shane <6071159+smashedr@users.noreply.github.com> Date: Thu, 27 Nov 2025 23:05:28 -0800 Subject: [PATCH 2/2] Update Docs --- docs/examples.md | 6 ++++++ docs/index.md | 7 ++++--- docs/usage.md | 12 +++++++++--- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/docs/examples.md b/docs/examples.md index 0daca4d..4efe109 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -148,3 +148,9 @@ Example repositories using this action to deploy to GitHub Pages. | [cssnr/zensical-action-docs](https://github.com/cssnr/zensical-action-docs) | [docs.yaml](https://github.com/cssnr/zensical-action-docs/blob/master/.github/workflows/docs.yaml) | [dev.yaml](https://github.com/cssnr/zensical-action-docs/blob/master/.github/workflows/dev.yaml) | [zensical-action.cssnr.com](https://zensical-action.cssnr.com/) | | [cssnr/actions-tools](https://github.com/cssnr/actions-tools) | [docs.yaml](https://github.com/cssnr/actions-tools/blob/master/.github/workflows/docs.yaml) | [dev.yaml](https://github.com/cssnr/actions-tools/blob/master/.github/workflows/dev.yaml) | [actions-tools.cssnr.com](https://actions-tools.cssnr.com/) | | [cssnr/zipline-cli](https://github.com/cssnr/zipline-cli) | [docs.yaml](https://github.com/cssnr/zipline-cli/blob/master/.github/workflows/docs.yaml) | [dev.yaml](https://github.com/cssnr/zipline-cli/blob/master/.github/workflows/dev.yaml) | [zipline-cli.cssnr.com](https://zipline-cli.cssnr.com/) | + +  + +!!! question + + If you need **help** getting started or run into any issues, [support](support.md) is available! diff --git a/docs/index.md b/docs/index.md index f72ce13..463d22a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -20,10 +20,11 @@ icon: lucide/rocket [![Discord](https://img.shields.io/discord/899171661457293343?logo=discord&logoColor=white&label=discord&color=7289da)](https://discord.gg/wXy6m2X8wY) [![Ko-fi](https://img.shields.io/badge/Ko--fi-72a5f2?logo=kofi&label=support)](https://ko-fi.com/cssnr) -Zensical GitHub Action to checkout, build, upload, and deploy [Zensical Docs](https://github.com/zensical/zensical) to GitHub Pages. +[![GitHub](https://img.shields.io/badge/github-232925?style=for-the-badge&logo=github)](https://github.com/cssnr/zensical-action?tab=readme-ov-file#readme) +[![Marketplace](https://img.shields.io/badge/marketplace-2088ff?style=for-the-badge&logo=githubactions&logoColor=white)](https://github.com/marketplace/actions/zensical-action) +[![Docs](https://img.shields.io/badge/docs-FF7735?style=for-the-badge&logo=materialformkdocs&logoColor=white)](https://github.com/cssnr/zensical-action-docs) -- https://github.com/cssnr/zensical-action -- https://github.com/marketplace/actions/zensical-action +Zensical GitHub Action to checkout, build, upload, and deploy [Zensical Docs](https://github.com/zensical/zensical) to GitHub Pages. ## Features diff --git a/docs/usage.md b/docs/usage.md index aa0b91a..2ff55f9 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -31,19 +31,19 @@ The [Outputs](#outputs) include the `page_url` and more. | [post](#preparepost) | - | Post script (after build) | | **summary** | `true` | Add Job Summary to Workflow | -### upload +#### upload Determines the type of artifact uploaded. For a normal artifact use `artifact`. Default: `github-pages` -### name +#### name Artifact Name if [upload](#upload) is set to `artifact`. Default: `artifact` -### deploy +#### deploy This runs [actions/deploy-pages](https://github.com/actions/deploy-pages). Set to `false` to skip this. Make sure you have the required [permissions](#permissions). @@ -105,3 +105,9 @@ Example Outputs. ``` See the [Examples](examples.md) for more... + +  + +!!! question + + If you need **help** getting started or run into any issues, [support](support.md) is available!