-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
46 lines (46 loc) · 1.47 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: 'Dependadoc'
description: 'Mirror documentation files to another repo'
branding:
icon: 'book'
color: 'green'
inputs:
mirrored-folder:
description: 'folder to evaluate for changed files'
required: true
docs-repository:
description: 'repo to open PR against, e.g., yourorg/your-repo'
required: true
docs-repository-path:
description: 'relative path to place mirrored folder'
required: false
default: '.'
docs-repository-token-variable:
description: 'name of variable where repo token is stored; default is DOC_REPO_TOKEN'
required: true
runs:
using: "composite"
steps:
- name: Checkout current repo
uses: actions/checkout@v3
with:
path: main
- name: Checkout documentation repo
uses: actions/checkout@v3
with:
repository: ${{ inputs.docs-repository }}
path: docs
fetch-depth: 0
token: ${{ inputs.docs-repository-token-variable }}
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
shell: bash
- run: dependadoc.sh
shell: bash
# relative to $GITHUB_WORKSPACE
working-directory: docs
env:
MIRRORED_FOLDER: ${{ inputs.mirrored-folder }}
MIRRORED_REPOSITORY_FULL_NAME: ${{ github.repository }}
DOCS_REPOSITORY_PATH: ${{ inputs.docs-repository-path}}
GITHUB_ACTOR: ${{ github.repository }}
GITHUB_WORKSPACE: ${{ github.workspace }}
GITHUB_TOKEN: ${{ inputs.docs-repository-token-variable }}