| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- name: Deploy markdown.html
- description: Compress markdown.html and deploy to target directory
- author: 'PJ568'
- inputs:
- target-dir:
- description: Relative path under $GITHUB_WORKSPACE to deploy the minimized HTML file
- default: ""
- file-name:
- description: Name of the minimized HTML file
- default: "index.html"
- use-minified:
- description: Whether to use minified HTML file
- default: "true"
- use-all-in-one:
- description: Whether to use all-in-one HTML file
- default: "false"
- runs:
- using: "composite"
- steps:
- - name: Generate file name
- id: gen-file-name
- run: |
- USE_ALL_IN_ONE=""
- USE_MINIFIED=""
- if [ "${{ inputs.use-all-in-one }}" = "true" ]; then
- USE_ALL_IN_ONE=".allinone"
- fi
- if [ "${{ inputs.use-minified }}" = "true" ]; then
- USE_MINIFIED=".min"
- fi
- echo "file_name=index${USE_ALL_IN_ONE}${USE_MINIFIED}.html" >> $GITHUB_OUTPUT
- echo "index${USE_ALL_IN_ONE}${USE_MINIFIED}.html"
- shell: bash
- - name: Deploy pre-generated markdown.html file
- uses: robinraju/release-downloader@v1
- with:
- repository: 'PJ-568/MARKDOWN.HTML'
- latest: true
- fileName: ${{ steps.gen-file-name.outputs.file_name }}
- tarBall: false
- zipBall: false
- out-file-path: ${{ inputs.target-dir }}
- - name: Rename file
- run: |
- mv -v $GITHUB_WORKSPACE/${{ steps.gen-file-name.outputs.file_name }} $GITHUB_WORKSPACE/${{ inputs.file-name }}
- shell: bash
- branding:
- icon: 'book-open'
- color: 'green'
|