Skip to content

Commit

Permalink
Add readme param (#113)
Browse files Browse the repository at this point in the history
* Add readme param

* publish tbdocs image
  • Loading branch information
leordev authored Jan 5, 2024
1 parent 7454a1d commit c53fe19
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/publish-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish Image

on:
pull_request:
push:
branches:
- main
- 'releases/*'
workflow_dispatch:

jobs:
deploy-backend:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository }}

- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ inputs:
# docsReporter: name of the docs reporter tool
# docsReporterIgnore: list of errors to ignore `extractor:ae-missing-release-tag`, `docs:tsdoc-param-tag-with-invalid-name`, etc.
# docsGenerator: name of the docs generator tool
# readmeFile: path to the readme file (eg README.md)
# targetRepoPath: path to push the generated docs in the target repo (see docs_target_owner_repo below)

token:
Expand Down
6 changes: 6 additions & 0 deletions examples/foo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Foo Package Example

Just a simple package to exemplify the functionalities of generating docs with
multiple packages. This is useful for monorepos.

See the entire source code at [index.ts](./index.ts)
2 changes: 1 addition & 1 deletion src/docs-generator/typedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const generateTypedoc = async (
entryPoints: [entryPointFile],
skipErrorChecking: true,
disableSources: true,
readme: 'none',
readme: entryPoint.readmeFile || 'none',
includeVersion: true
}

Expand Down
5 changes: 5 additions & 0 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ export interface EntryPointInputs {
**/
docsGenerator?: DocsGeneratorType

/**
* Path to the readme file that will be used as the index page of the docs
*/
readmeFile?: string

/**
* Path to the target repo where the docs will be pushed to.
* If not present, the docs will be generated locally.
Expand Down

0 comments on commit c53fe19

Please sign in to comment.