|
|
@@ -0,0 +1,35 @@
|
|
|
+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: "."
|
|
|
+ required: true
|
|
|
+
|
|
|
+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 }}"
|
|
|
+ mv ${{ github.action_path }}/index.min.html "${{ inputs.target-dir }}/index.html"
|
|
|
+ shell: bash
|
|
|
+
|
|
|
+branding:
|
|
|
+ icon: 'book-open'
|
|
|
+ color: 'green'
|