feat: modernize application — source, platform artifacts, CI/CD
- chore: ingest source code 108 files from https://github.com/spring-projects/spring-petclinic - feat: add platform deployment artifacts - feat: add CI/CD workflow automation
This commit is contained in:
52
.gitea/workflows/techdocs.yml
Normal file
52
.gitea/workflows/techdocs.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
name: Build and Publish TechDocs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "docs/**"
|
||||
- "mkdocs.yml"
|
||||
- "catalog-info.yaml"
|
||||
workflow_dispatch: {}
|
||||
|
||||
env:
|
||||
AZURE_FEDERATED_TOKEN_FILE: /var/run/secrets/azure/tokens/azure-identity-token
|
||||
AZURE_ACCOUNT_NAME: "bstagecjotdevsttechdocs"
|
||||
ENTITY_NAMESPACE: default
|
||||
ENTITY_KIND: component
|
||||
ENTITY_NAME: demo-kpc-1
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get update -qq && apt-get install -y python3-pip
|
||||
pip3 install mkdocs-techdocs-core==1.*
|
||||
npm install -g @techdocs/cli
|
||||
- name: Build TechDocs site
|
||||
run: techdocs-cli generate --source-dir . --output-dir ./site --no-docker --verbose
|
||||
- name: Install Azure CLI
|
||||
run: |
|
||||
if ! command -v az &>/dev/null; then curl -sL https://aka.ms/InstallAzureCLIDeb | bash; fi
|
||||
- name: Azure login (OIDC)
|
||||
run: |
|
||||
az login \
|
||||
--service-principal \
|
||||
--username "$AZURE_CLIENT_ID" \
|
||||
--tenant "$AZURE_TENANT_ID" \
|
||||
--federated-token "$(cat $AZURE_FEDERATED_TOKEN_FILE)"
|
||||
- name: Publish TechDocs site
|
||||
run: |
|
||||
techdocs-cli publish \
|
||||
--publisher-type azureBlobStorage \
|
||||
--storage-name "techdocs" \
|
||||
--azureAccountName "$AZURE_ACCOUNT_NAME" \
|
||||
--entity "$ENTITY_NAMESPACE/$ENTITY_KIND/$ENTITY_NAME"
|
||||
Reference in New Issue
Block a user