name: Deploy markdown.html
description: Compress markdown.html and deploy to target directory
author: 'PJ568'
inputs:
target-dir:
description: Directory to deploy the minimized HTML file
default: "."
file-name:
description: Name of the minimized HTML file
default: "index.html"
runs:
using: "composite"
steps:
- name: Setup Rust
uses: MatteoH2O1999/setup-rust@v1
- name: Build project
run: cargo build --release
shell: bash
working-directory: ${{ github.action_path }}
- name: Generate minimized HTML
run: cargo run --release -- ${{ github.action_path }}/index.html ${{ github.action_path }}/index.min.html
shell: bash
working-directory: ${{ github.action_path }}
- name: Deploy minimized file
run: |
mkdir -p "${{ inputs.target-dir }}"
cp -uv ${{ github.action_path }}/index.min.html "${{ inputs.target-dir }}/${{ inputs.file-name }}"
shell: bash
branding:
icon: 'book-open'
color: 'green'