Skip to content

Commit

Permalink
Refactor code and update tsDoc workflow
Browse files Browse the repository at this point in the history
This commit includes changes in the `index.js`:
- Corrected the `getInput` function for the `stripYamlFrontmatter` variable.
- Replaced `template` var with `theme`.
- Added a missing closing parenthesis to `template_dir` line.

The tsDoc workflow in the `tsDoc.yml`
  • Loading branch information
erikyo committed Dec 11, 2023
1 parent c339ea5 commit 1a33f4d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .actrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-P catthehacker/ubuntu:act-latest


4 changes: 1 addition & 3 deletions .github/workflows/tsDoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: TSDoc Actions

on:
release:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand All @@ -28,7 +27,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
Expand All @@ -42,7 +41,6 @@ jobs:
output_dir: ./docs
front_page: README.md
recurse: true
excludeExternals: true

- name: Setup Pages
uses: actions/configure-pages@v3
Expand Down
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async function run () {
const gitRemote = core.getInput('gitRemote')
const disableGit = core.getInput('disableGit')
const readme = core.getInput('readme')
const stripYamlFrontmatter = core.getBooleanInput('stripYamlFrontmatter')
const stripYamlFrontmatter = core.getInput('stripYamlFrontmatter')

if (source_dir) {
try {
Expand All @@ -63,8 +63,8 @@ async function run () {
}
}

if (template) {
templateName = await installer.installTemplate(template)
if (theme) {
templateName = await installer.installTemplate(theme)
}

const typedocPath = path.join(__dirname, '../node_modules/typedoc/bin/typedoc')
Expand All @@ -87,7 +87,7 @@ async function run () {
args.push('--theme', template)
}
if (template_dir) {
args.push('--template_dir', path.join(GITHUB_WORKSPACE, '../node_modules/', templateName, template_dir));
args.push('--template_dir', path.join(GITHUB_WORKSPACE, '../node_modules/', templateName, template_dir))
}
if (front_page) {
const readmePath = path.join(GITHUB_WORKSPACE, front_page)
Expand Down

0 comments on commit 1a33f4d

Please sign in to comment.