Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
#prepare: 'sed -i "s/>Zensical</>Zensical ${ZENSICAL_VERSION}</" zensical.toml'
prepare: |
sed -i "s/>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"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 18 additions & 0 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,17 @@ jobs:
tree "${{ steps.zensical.outputs.path }}"
```

</details>
<details><summary>Install Project and Run Prepare</summary>

```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'
```

</details>

For more examples, you can check out other projects using this action:
Expand All @@ -136,3 +147,10 @@ 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/) |

&nbsp;

!!! question

If you need **help** getting started or run into any issues, [support](support.md) is available!
12 changes: 7 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,18 @@ 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

- 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).

Expand Down
52 changes: 36 additions & 16 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,34 @@ The [Outputs](#outputs) include the `page_url` and more.

**All Inputs are Optional.**

| Input | Default&nbsp;Value | Description&nbsp;of&nbsp;the&nbsp;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 |

### upload
| Input | Default&nbsp;Value | Description&nbsp;of&nbsp;the&nbsp;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

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).
Expand All @@ -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.
Expand Down Expand Up @@ -91,3 +105,9 @@ Example Outputs.
```

See the [Examples](examples.md) for more...

&nbsp;

!!! question

If you need **help** getting started or run into any issues, [support](support.md) is available!
Loading