Skip to content

Commit

Permalink
Merge pull request #61 from Staffbase/techdocs
Browse files Browse the repository at this point in the history
✨ Added backstage-techdocs action
  • Loading branch information
axdotl committed Sep 20, 2022
2 parents 4de63dc + 611f845 commit ffdbf3f
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/template_techdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: TechDocs

on:
workflow_call:
inputs:
aws-region:
required: false
type: string
default: 'eu-central-1'
entity-kind:
required: false
type: string
default: 'Component'
entity-name:
required: false
type: string
default: ${{ github.event.repository.name }}
secrets:
aws-access-key-id:
required: false
aws-secret-access-key:
required: false

jobs:
techdocs:

name: TechDocs
runs-on: ubuntu-20.04

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

- name: Build and Publish Site
uses: Staffbase/backstage-techdocs-action@v0.1.1
with:
entity-kind: ${{ inputs.entity-kind }}
entity-name: ${{ inputs.entity-name }}
publisher-type: 'awsS3'
storage-name: 'staffbase-backstage-techdocs'
aws-region: ${{ inputs.aws-region }}
aws-access-key-id: ${{ secrets.aws-access-key-id }}
aws-secret-access-key: ${{ secrets.aws-secret-access-key }}
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,34 @@ jobs:
```
</details>

### TechDocs

<details>
<summary>This GitHub Action can be used for generating and publishing Backstage TechDocs.</summary>

```yml
name: TechDocs

on:
push:
branches:
- 'main'

jobs:
techdocs:
uses: Staffbase/gha-workflows/.github/workflows/template_techdocs.yml@v1.6.0
with:
# optional: Kind of the Backstage entity, default: Component
# ref: https://backstage.io/docs/features/software-catalog/descriptor-format#contents
entity-kind: Component
# optional: Name of the Backstage entity, default: repository name
entity-name: custom-entity-name
secrets:
aws-access-key-id: ${{ secrets.TECHDOCS_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.TECHDOCS_AWS_SECRET_ACCESS_KEY }}
```
</details>

### Yamllint

<details>
Expand Down

0 comments on commit ffdbf3f

Please sign in to comment.