-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
71 lines (63 loc) · 1.92 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: 'Secuoyas Techdocs'
description: 'Builds and pushes techdocs to Backstage'
inputs:
name:
description: 'name of the component'
required: true
plugins:
description: 'list of additional python plugin dependencies to add'
required: false
aws_role_to_assume_arn:
description: AWS role para poder subir ficheros
required: true
aws_bucket:
description: AWS bucket
required: true
aws_region:
description: AWS region
required: true
componentName:
description: Name of the component inside Backstage (must be equal to catalog-info.yaml name)
default: ${{ github.event.repository.name }}
required: false
componentPath:
description: Path
required: false
default: .
runs:
using: composite
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '16.20.0'
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install techdocs-cli
shell: bash
run: sudo npm install -g @techdocs/cli
- name: Install mkdocs and mkdocs plugins
shell: bash
run: |
python -m pip install mkdocs-techdocs-core==1.*
python -m pip install pymdown-extensions==10.0.1
- name: Generate docs site
shell: bash
working-directory: ${{ inputs.componentPath }}
run: techdocs-cli generate --no-docker --verbose
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ inputs.aws_role_to_assume_arn }}
aws-region: ${{ inputs.aws_region }}
role-session-name: techdocs-uploader-session
- name: Upload to S3
shell: bash
working-directory: ${{ inputs.componentPath }}
run: |
ls -l
aws s3 sync site ${{ inputs.aws_bucket }}/default/component/${{ inputs.componentName }}