-
Notifications
You must be signed in to change notification settings - Fork 39
54 lines (43 loc) · 1.9 KB
/
publish-docs.yaml
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
name: Build and publish docs
on:
push:
branches: [main]
jobs:
publish_docs:
runs-on: ubuntu-latest
# The following secrets are required in your CI environment for publishing files to AWS S3.
# e.g. You can use GitHub Organization secrets to set them for all existing and new repositories.
env:
CI: true
NODE_OPTIONS: --max-old-space-size=4096
TECHDOCS_DIGITAL_OCEAN_SPACES_BUCKET_NAME: ${{ secrets.TECHDOCS_DIGITAL_OCEAN_SPACES_BUCKET_NAME }}
AWS_ACCESS_KEY_ID: ${{ secrets.DIGITAL_OCEAN_SPACES_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DIGITAL_OCEAN_SPACES_SECRET_KEY }}
DIGITAL_OCEAN_SPACES_ENDPOINT: ${{ secrets.DIGITAL_OCEAN_SPACES_ENDPOINT }}
ENTITY_NAMESPACE: 'default'
ENTITY_KIND: 'Component'
ENTITY_NAME: 'sample-service-1'
# In a Software template, Scaffolder will replace {{cookiecutter.component_id | jsonify}}
# with the correct entity name. This is same as metadata.name in the entity's catalog-info.yaml
# ENTITY_NAME: '{{ cookiecutter.component_id | jsonify }}'
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/setup-python@v2
- name: Install techdocs-cli
run: sudo npm install -g @techdocs/cli
- name: Print the python version
run: python --version
- name: Install graphviz
run: sudo apt install graphviz
- name: Install mkdocs and mkdocs plugins
run: python -m pip install mkdocs-techdocs-core==0.*
- name: Generate docs site
run: techdocs-cli generate --no-docker --verbose
- name: Publish docs site
run:
techdocs-cli publish --publisher-type awsS3 --storage-name
$TECHDOCS_DIGITAL_OCEAN_SPACES_BUCKET_NAME --entity
$ENTITY_NAMESPACE/$ENTITY_KIND/$ENTITY_NAME --awsEndpoint
$DIGITAL_OCEAN_SPACES_ENDPOINT