Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
Update inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Nelson committed Jan 1, 2020
1 parent a9724da commit eea3de6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
8 changes: 4 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ name: 'Docs Builds'
description: 'Builds docs and pushes them to a separate branch'
author: 'Spectacles'
inputs:
docsOutput:
docs-output:
description: Location of the generated docs files.
default: docs
branch:
description: Target branch to push docs to.
default: gh-pages
targetDirectory:
target-directory:
description: Directory in which to place docs files.
default: echo ${{ github.ref }} | cut -d / -f 3-
docsCommand:
docs-command:
description: Command that generates the docs files.
default: npm run docs
githubToken:
github-token:
description: Your GitHub token to deploy docs with.
required: true
runs:
Expand Down
8 changes: 4 additions & 4 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ which('bash', true).then(bash => {
return exec(bash, ['docs.sh'], {
env: {
REPO: `https://${process.env.GITHUB_ACTOR}:${getInput('githubToken')}@github.com/${process.env.GITHUB_REPOSITORY}.git`,
DOCS_DIRECTORY: getInput('docsDirectory'),
TARGET_BRANCH: getInput('targetBranch'),
TARGET_DIRECTORY: getInput('targetDirectory'),
DOCS_COMMAND: getInput('docsCommand'),
DOCS_DIRECTORY: getInput('docs-directory'),
TARGET_BRANCH: getInput('target-branch'),
TARGET_DIRECTORY: getInput('target-directory'),
DOCS_COMMAND: getInput('docs-command'),
},
});
}).catch(error => {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "dist/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc"
"build": "ncc build --minify index.ts -o dist"
},
"repository": {
"type": "git",
Expand All @@ -24,6 +24,7 @@
"@actions/io": "^1.0.1"
},
"devDependencies": {
"@zeit/ncc": "^0.20.5",
"typescript": "^3.7.2"
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"alwaysStrict": true,
"declaration": false,
"inlineSourceMap": true,
"inlineSourceMap": false,
"lib": ["es2019"],
"module": "commonjs",
"moduleResolution": "node",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.14.tgz#1c1d6e3c75dba466e0326948d56e8bd72a1903d2"
integrity sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA==

"@zeit/ncc@^0.20.5":
version "0.20.5"
resolved "https://registry.yarnpkg.com/@zeit/ncc/-/ncc-0.20.5.tgz#a41af6e6bcab4a58f4612bae6137f70bce0192e3"
integrity sha512-XU6uzwvv95DqxciQx+aOLhbyBx/13ky+RK1y88Age9Du3BlA4mMPCy13BGjayOrrumOzlq1XV3SD/BWiZENXlw==

atob-lite@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/atob-lite/-/atob-lite-2.0.0.tgz#0fef5ad46f1bd7a8502c65727f0367d5ee43d696"
Expand Down

0 comments on commit eea3de6

Please sign in to comment.