TypeScript Github-Action

LiquidJS Github Action

Github Action to render LiquidJS.

LiquidJS Github Action

Name: ntsd/liquidjs-action@main

Github Action to render LiquidJS.

Inputs

variables - The JSON variables to render. required.

template-string - The template string to render. optional.

template-file - The file template to render. optional.

output-file - The rendered out put file. optional.

output-name - The output state name for the result. default result.

Template

This action required template file or template string from input template-file or template-string. The template will render by LiquidJS. You can find the example template file here. The template file will render to file input output-file or Github Action Output name from input output-name.

Examples

Github Action Output render

name: Render LiquidJS
on: push

jobs:
  liquidjs-job:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: LiquidJS Action
        id: run-liquidjs
        uses: ntsd/liquidjs-action@main
        with:
          variables: `{"hello": "Hello LiquidJS"}`
          template-string: "{{ hello }}"
      - name: Echo output
        run: echo "The rendered result is '${{ steps.run-liquidjs.outputs.result }}'"

File render

name: Render LiquidJS
on: push

jobs:
  liquidjs-job:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: LiquidJS Action
        uses: ntsd/liquidjs-action@main
        with:
          variables: `{"hello": "Hello LiquidJS"}`
          template-string: "{{ hello }}"
          output-file: "./RENDER.md"
      - name: Commit files
        run: |
          git config --local user.email "[email protected]"
          git config --local user.name "ntsd"
          git commit -am "docs: auto update RENDER.md"
          git push