Skip to content

Commit

Permalink
chore: Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pasi-romo-idealo committed May 16, 2024
1 parent 9e3b7d7 commit f4894d4
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 61 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/techdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ jobs:

- name: Build and publish docs
uses: idealo/publish-techdocs-action@v3
with:
component-name: 'github-app-token-generator'
41 changes: 1 addition & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,3 @@
# GitHub App installation access token generator

GitHub Action that can be used to generate an installation access token for a GitHub App. This token can for instance be used to clone repos, given the GitHub App has sufficient permissions to do so.

## Usage

```yaml
name: Checkout repos
on: push
jobs:
checkout:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: idealo/[email protected]
id: get-token
with:
private-key: ${{ secrets.IDEALO_BOT_GH_APP_PRIVATE_KEY }}
app-id: ${{ secrets.IDEALO_BOT_GH_APP_ID }}

- name: Check out an other repo
uses: actions/checkout@v2
with:
repository: owner/repo
token: ${{ steps.get-token.outputs.token }}
```
## Requirements
The action needs two input parameters, `private-key` and `app-id`. To get these, simply create a GitHub App. The private key can be generated and downloaded, and should be added to the repos as a secret.

The installation ID that is used during the creation of the access token is created against the repo running the action. If you need to create the installation ID for a different repo you can use the `repo` input:

```yaml
uses: idealo/[email protected]
id: get-token
with:
private-key: ${{ secrets.IDEALO_BOT_GH_APP_PRIVATE_KEY }}
app-id: ${{ secrets.IDEALO_BOT_GH_APP_ID }}
repo: some/repo
```
[See the documentation in Backstage](https://backstage.idealo.tools/catalog/default/component/github-app-token-generator/docs)
61 changes: 42 additions & 19 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,42 @@
## Getting started

Start write your documentation by adding more markdown (.md) files to this folder (/docs) or replace the content in this file.

## Table of Contents

The Table of Contents on the right is generated automatically based on the hierarchy
of headings. Only use one H1 (`#` in Markdown) per file.

## Site navigation

For new pages to appear in the left hand navigation you need edit the `mkdocs.yml`
file in root of your repo. The navigation can also link out to other sites.


Note that MkDocs uses `mkdocs.yml`, not `mkdocs.yaml`, although both appear to work.
See also <https://www.mkdocs.org/user-guide/configuration/>.

our action supports Mermaid.js and plantUML for drawing diagrams
# GitHub App installation access token generator

GitHub Action that can be used to generate an installation access token for a GitHub App. This token can for instance be used to clone repos, given the GitHub App has sufficient permissions to do so.

## Usage

```yaml
name: Checkout repos
on: push
jobs:
checkout:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: idealo/[email protected]
id: get-token
with:
private-key: ${{ secrets.IDEALO_BOT_GH_APP_PRIVATE_KEY }}
app-id: ${{ secrets.IDEALO_BOT_GH_APP_ID }}

- name: Check out an other repo
uses: actions/checkout@v2
with:
repository: owner/repo
token: ${{ steps.get-token.outputs.token }}
```
## Requirements
The action needs two input parameters, `private-key` and `app-id`. To get these, simply create a GitHub App. The private key can be generated and downloaded, and should be added to the repos as a secret.

The installation ID that is used during the creation of the access token is created against the repo running the action. If you need to create the installation ID for a different repo you can use the `repo` input:

```yaml
uses: idealo/[email protected]
id: get-token
with:
private-key: ${{ secrets.IDEALO_BOT_GH_APP_PRIVATE_KEY }}
app-id: ${{ secrets.IDEALO_BOT_GH_APP_ID }}
repo: some/repo
```
4 changes: 2 additions & 2 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
site_name: 'your documentation site name'
site_description: 'a brief description'
#uncomment the below lines if you want to enable the edit button in your techdocs
#edit_uri: blob/main/docs/ #don't change it, just uncomment
#repo_url: '<insert your repo url here>'
edit_uri: blob/main/docs/ #don't change it, just uncomment
repo_url: 'https://github.com/idealo/github-app-token-generator'
theme:
name: material
palette:
Expand Down

0 comments on commit f4894d4

Please sign in to comment.