diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml new file mode 100644 index 0000000..d7ff251 --- /dev/null +++ b/.github/workflows/publish-image.yml @@ -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 }} diff --git a/action.yml b/action.yml index 9935840..16b770d 100644 --- a/action.yml +++ b/action.yml @@ -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: diff --git a/examples/foo/README.md b/examples/foo/README.md new file mode 100644 index 0000000..087749a --- /dev/null +++ b/examples/foo/README.md @@ -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) diff --git a/src/docs-generator/typedoc.ts b/src/docs-generator/typedoc.ts index 472b7c6..65887ae 100644 --- a/src/docs-generator/typedoc.ts +++ b/src/docs-generator/typedoc.ts @@ -39,7 +39,7 @@ export const generateTypedoc = async ( entryPoints: [entryPointFile], skipErrorChecking: true, disableSources: true, - readme: 'none', + readme: entryPoint.readmeFile || 'none', includeVersion: true } diff --git a/src/interfaces.ts b/src/interfaces.ts index cc70071..a267573 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -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.