Created
May 11, 2023 16:32
-
-
Save JordiPolo/a073c4fbd967189e49163f4548f4120a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Techdocs | |
inputs: | |
component_name: | |
description: Component name. It must match exactly with the name in the catalog file. | |
required: true | |
aws_access_id: | |
description: AWS access key able to access AWS green's S3 bucket | |
required: true | |
aws_access_secret: | |
description: AWS access secret able to read AWS green's S3 bucket | |
required: true | |
runs: | |
using: composite | |
# 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. | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
# We need history for the git-revision-date plugin to produce accurate values | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- 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 mkdocs-git-revision-date-localized-plugin | |
- name: Generate docs site | |
shell: bash | |
run: techdocs-cli generate --no-docker --verbose | |
- name: Publish docs site | |
shell: bash | |
env: | |
AWS_ACCESS_KEY_ID: ${{ inputs.aws_access_id }} | |
AWS_SECRET_ACCESS_KEY: ${{ inputs.aws_access_secret }} | |
AWS_REGION: us-east-1 | |
run: techdocs-cli publish --publisher-type awsS3 --storage-name devops-central --entity default/Component/${{ inputs.component_name }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment