1
0

action.yml 1010 B

12345678910111213141516171819202122232425262728293031323334353637
  1. name: Deploy markdown.html
  2. description: Compress markdown.html and deploy to target directory
  3. author: 'PJ568'
  4. inputs:
  5. target-dir:
  6. description: Directory to deploy the minimized HTML file
  7. default: "."
  8. file-name:
  9. description: Name of the minimized HTML file
  10. default: "index.html"
  11. runs:
  12. using: "composite"
  13. steps:
  14. - name: Setup Rust
  15. uses: MatteoH2O1999/setup-rust@v1
  16. - name: Build project
  17. run: cargo build --release
  18. shell: bash
  19. working-directory: ${{ github.action_path }}
  20. - name: Generate minimized HTML
  21. run: cargo run --release -- ${{ github.action_path }}/index.html ${{ github.action_path }}/index.min.html
  22. shell: bash
  23. working-directory: ${{ github.action_path }}
  24. - name: Deploy minimized file
  25. run: |
  26. mkdir -p "${{ inputs.target-dir }}"
  27. cp -uv ${{ github.action_path }}/index.min.html "${{ inputs.target-dir }}/${{ inputs.file-name }}"
  28. shell: bash
  29. branding:
  30. icon: 'book-open'
  31. color: 'green'