Skip to content

Commit c94a398

Browse files
committed
Add support for both args and config file
1 parent a7857ac commit c94a398

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

main.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,17 @@ const generateJazzyInstallCommand = () => {
2727
}
2828

2929
const generateJazzyArguments = () => {
30-
if (configFilePath) {
31-
return `jazzy --config ${configFilePath}`
32-
}
30+
var command = `jazzy`
3331

3432
if (jazzyArgs) {
35-
return `jazzy ${jazzyArgs}`
33+
command += ` ${jazzyArgs}`
3634
}
3735

38-
return "jazzy"
36+
if (configFilePath) {
37+
command += ` --config ${configFilePath}`
38+
}
39+
40+
return command
3941
}
4042

4143
const sliceDocumentsFromJazzyArgs = (outputArg) => {
@@ -94,7 +96,7 @@ const generateAndDeploy = () => {
9496
shell.exec("git add .")
9597
shell.exec("git commit -m 'Deploying Updated Jazzy Docs'")
9698
shell.exec(`git push --force ${remote} master:${branch}`)
97-
99+
98100
shell.cd(process.env.GITHUB_WORKSPACE)
99101
}
100102

@@ -103,4 +105,3 @@ try {
103105
} catch (error) {
104106
core.setFailed(error.message)
105107
}
106-

0 commit comments

Comments
 (0)