diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b7968d6..c8ba1f0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,8 +10,8 @@ jobs: - uses: actions/checkout@v2 - uses: ./ with: - format: txt - output: ./humans.txt + format: html + output: ./gh-pages/index.html - uses: peaceiris/actions-gh-pages@v2 env: ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} diff --git a/action.js b/action.js index d738fd8..19365a2 100644 --- a/action.js +++ b/action.js @@ -6,6 +6,7 @@ const chalk = require('chalk') const formatters = { txt: txtFormatter, + html: htmlFormatter, json: jsonFormatter, shell: (data, opts) => txtFormatter(data, { ...opts, colors: true}), } @@ -62,3 +63,12 @@ function mapColorRange(strings, base, total) { return strings.map((n, i) => chalk.hsl(((i + base) / total) * 360, 100, 50)(n)) } +function htmlFormatter(data, opts) { + fs.writeSync(opts.output, ` + + Actions - humans.txt +
+  `)
+  txtFormatter(data, opts)
+  fs.writeSync(opts.output, "
") +} diff --git a/actions.yml b/actions.yml index 682dd90..40403da 100644 --- a/actions.yml +++ b/actions.yml @@ -2,7 +2,7 @@ name: 'GitHub Actions humans.txt' description: 'List out the humans who help feed and tend the robots of GitHub Actions' inputs: format: - description: 'How to output the people of actions - txt, json or ascii' + description: 'How to output the people of actions - txt, json, html or ascii' default: 'ascii' output: description: 'Where to output the file - stdout otherwise'