Examples¶
Zensical Action example Workflows and Repositories.
Workflows¶
💡 Click on an example heading to expand or collapse the example.
Build and Deploy to GitHub Pages
name: 'Docs'
on:
workflow_dispatch:
push:
branches: [master]
paths:
- '.github/workflows/docs.yaml'
- 'zensical.toml'
- 'docs/**'
jobs:
docs:
name: 'Docs'
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.zensical.outputs.page_url }}
steps:
- name: 'Zensical Action'
id: zensical
uses: cssnr/zensical-action@v1
Build and Deploy a Normal Artifact
name: 'Docs'
on:
workflow_dispatch:
push:
branches: [master]
paths:
- '.github/workflows/docs.yaml'
- 'zensical.toml'
- 'docs/**'
jobs:
build:
name: 'Build'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: 'Zensical Action'
uses: cssnr/zensical-action@v1
with:
upload: 'artifact'
deploy:
name: 'Deploy'
uses: cssnr/workflows/.github/workflows/deploy-static.yaml@master
needs: build
with:
name: github-pages
url: https://dev-static.cssnr.com/
robots: true
secrets:
host: ${{ secrets.DEV_DEPLOY_HOST }}
port: ${{ secrets.DEV_DEPLOY_PORT }}
user: ${{ secrets.DEV_DEPLOY_USER }}
pass: ${{ secrets.DEV_DEPLOY_PASS }}
webhook: ${{ secrets.DISCORD_WEBHOOK }}
permissions:
contents: read
Only Build the Site
name: 'Docs'
on:
workflow_dispatch:
push:
branches: [master]
paths:
- '.github/workflows/docs.yaml'
- 'zensical.toml'
- 'docs/**'
jobs:
docs:
name: 'Docs'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: 'Zensical Action'
id: zensical
uses: cssnr/zensical-action@v1
with:
upload: false
- name: 'Build Tree'
run: |
tree "${{ steps.zensical.outputs.path }}"
Install Project and Run Prepare
For more examples, you can check out other projects using this action:
https://github.com/cssnr/zensical-action/network/dependents
Repositories¶
Example repositories using this action to deploy to GitHub Pages.
| Repository Link | Pages | Preview | Website Link |
|---|---|---|---|
| cssnr/zensical-action-docs | docs.yaml | dev.yaml | zensical-action.cssnr.com |
| cssnr/actions-tools | docs.yaml | dev.yaml | actions-tools.cssnr.com |
| cssnr/zipline-cli | docs.yaml | dev.yaml | zipline-cli.cssnr.com |
Question
If you need help getting started or run into any issues, support is available!
