diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c8ba1f0..a139f30 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,19 +1,21 @@ on: push: - branches: ["master", "deploy-test"] + branches: ["master"] jobs: depoy: runs-on: ubuntu-latest steps: - - run: mkdir gh-pages - uses: actions/checkout@v2 + - run: mkdir gh-pages + - run: cp favicon.ico gh-pages - uses: ./ with: format: html output: ./gh-pages/index.html + - run: ls gh-pages - uses: peaceiris/actions-gh-pages@v2 env: ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} - PUBLISH_DIR: ./gh-pages + PUBLISH_DIR: gh-pages PUBLISH_BRANCH: gh-pages diff --git a/action.js b/action.js index 19365a2..143b335 100644 --- a/action.js +++ b/action.js @@ -35,7 +35,7 @@ function invalidFormat(format) { return } -function jsonFormatter({humans, output}) { +function jsonFormatter({humans}, {output}) { fs.writeSync(output, JSON.stringify(humans, null, 4)) } diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..ebae40c Binary files /dev/null and b/favicon.ico differ diff --git a/test.sh b/test.sh index 22f7736..f99dd3e 100755 --- a/test.sh +++ b/test.sh @@ -7,4 +7,7 @@ node action.js txt # check default arg node action.js >/dev/null node action.js shell +node action.js html +node action.js txt /tmp/hu-output +grep "Current humans" /tmp/hu-output