Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/publish-cfdocs-snippets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Publish CF Docs Snippets

on:
workflow_dispatch:

push:
branches:
- main
paths:
- docs/src/**
- apps/app/src/pack/examples/**
- cluster/helm/**
- gha-scripts/cf-docs/**

permissions:
actions: write
contents: read

jobs:
publish_cfdocs_snippets:
# Requires repository variable ENABLE_SYNC_PROCESS=true (see source-repo-workflow-readme.md).
if: vars.ENABLE_SYNC_PROCESS == 'true'
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Extract snippet data
run: node gha-scripts/cf-docs/generateOutputDocs.js

- name: Store artifact output
id: store-artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ${{ github.event.repository.name }}-snippets
path: docs-output/

- name: Prepare additional params
id: additional-params
run: echo "short_sha=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"

- name: Generate snippet writer app token
id: writer-token
uses: actions/create-github-app-token@3a38478537b0cedb864eaff129aacbe19810c233 # v2.2.1
with:
app-id: ${{ secrets.CF_DOCS_SNIPPET_WRITER_APP_ID }}
private-key: ${{ secrets.CF_DOCS_SNIPPET_WRITER_PRIVATE_KEY }}
owner: ${{ vars.MAIN_REPO_ORG }}
repositories: ${{ vars.MAIN_REPO_NAME }}

- name: Update main docs repo
uses: passeidireto/trigger-external-workflow-action@main
env:
PAYLOAD_run-id: ${{ github.run_id }}
PAYLOAD_artifact-id: ${{ steps.store-artifact.outputs.artifact-id }}
PAYLOAD_repo-name: ${{ github.event.repository.name }}
PAYLOAD_repo-org: ${{ github.repository_owner }}
PAYLOAD_repo-version: main
PAYLOAD_trigger_sha_short: ${{ steps.additional-params.outputs.short_sha }}
with:
repository: ${{ vars.MAIN_REPO_ORG }}/${{ vars.MAIN_REPO_NAME }}
event: update_snippets
github_pat: ${{ steps.writer-token.outputs.token }}
193 changes: 193 additions & 0 deletions gha-scripts/cf-docs/exportConfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
{
"rstIncludeRefTargets": {
"validator-backups": "/global-synchronizer/production-operations/validator-backups",
"sv_backups": "/global-synchronizer/production-operations/sv-backup",
"traffic": "/global-synchronizer/deployment/synchronizer-traffic",
"traffic_topup": "/global-synchronizer/deployment/synchronizer-traffic#traffic-top-ups-how-does-one-buy-traffic",
"traffic_parameters": "/global-synchronizer/deployment/synchronizer-traffic#traffic-parameters",
"traffic parameters": "/global-synchronizer/deployment/synchronizer-traffic#traffic-parameters",
"traffic_accounting": "/global-synchronizer/deployment/synchronizer-traffic#traffic-accounting-what-counts-as-traffic"
},
"urlSubstitutions": {
"https://docs.daml.com/canton/usermanual/kms/kms_aws_setup.html": "[Canton KMS operations](/global-synchronizer/production-operations/kms-operations#configure-a-amazon-web-services-aws-kms)",
"https://docs.daml.com/canton/usermanual/kms/kms_gcp_setup.html": "[Canton KMS operations](/global-synchronizer/production-operations/kms-operations#configure-a-google-cloud-provider-gcp-kms)"
},
"snippets": [
{
"snippetName": "splice-literal-full-apps-app-src-pack-examples-recovery-manual-identities-dump",
"sourceRepo": "splice",
"sourceFilepath": "apps/app/src/pack/examples/recovery/manual-identities-dump.sc",
"location": {
"type": "fullFile"
},
"description": "",
"options": {
"language": "scala"
}
},
{
"snippetName": "splice-literal-full-apps-app-src-pack-examples-sv-helm-kms-participant-aws-values",
"sourceRepo": "splice",
"sourceFilepath": "apps/app/src/pack/examples/sv-helm/kms-participant-aws-values.yaml",
"location": {
"type": "fullFile"
},
"description": "",
"options": {
"language": "yaml"
}
},
{
"snippetName": "splice-literal-full-apps-app-src-pack-examples-sv-helm-kms-participant-gcp-values",
"sourceRepo": "splice",
"sourceFilepath": "apps/app/src/pack/examples/sv-helm/kms-participant-gcp-values.yaml",
"location": {
"type": "fullFile"
},
"description": "",
"options": {
"language": "yaml"
}
},
{
"snippetName": "splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-configuring-topup-start",
"sourceRepo": "splice",
"sourceFilepath": "apps/app/src/pack/examples/sv-helm/standalone-validator-values.yaml",
"location": {
"type": "stringMarker",
"start": "CONFIGURING_TOPUP_START",
"end": "CONFIGURING_TOPUP_END"
},
"description": "",
"options": {
"language": "yaml"
}
},
{
"snippetName": "splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-participant-bootstrap-migrate-to-new-participant-start",
"sourceRepo": "splice",
"sourceFilepath": "apps/app/src/pack/examples/sv-helm/standalone-validator-values.yaml",
"location": {
"type": "stringMarker",
"start": "PARTICIPANT_BOOTSTRAP_MIGRATE_TO_NEW_PARTICIPANT_START",
"end": "PARTICIPANT_BOOTSTRAP_MIGRATE_TO_NEW_PARTICIPANT_END"
},
"description": "",
"options": {
"language": "yaml"
}
},
{
"snippetName": "splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-scan-client-configuration-start",
"sourceRepo": "splice",
"sourceFilepath": "apps/app/src/pack/examples/sv-helm/standalone-validator-values.yaml",
"location": {
"type": "stringMarker",
"start": "SCAN_CLIENT_CONFIGURATION_START",
"end": "SCAN_CLIENT_CONFIGURATION_END"
},
"description": "",
"options": {
"language": "yaml"
}
},
{
"snippetName": "splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-synchronizer-configuration-start",
"sourceRepo": "splice",
"sourceFilepath": "apps/app/src/pack/examples/sv-helm/standalone-validator-values.yaml",
"location": {
"type": "stringMarker",
"start": "SYNCHRONIZER_CONFIGURATION_START",
"end": "SYNCHRONIZER_CONFIGURATION_END"
},
"description": "",
"options": {
"language": "yaml"
}
},
{
"snippetName": "splice-literal-marker-apps-app-src-pack-examples-sv-helm-sv-validator-values-sv-participant-pruning-schedule-start",
"sourceRepo": "splice",
"sourceFilepath": "apps/app/src/pack/examples/sv-helm/sv-validator-values.yaml",
"location": {
"type": "stringMarker",
"start": "SV_PARTICIPANT_PRUNING_SCHEDULE_START",
"end": "SV_PARTICIPANT_PRUNING_SCHEDULE_END"
},
"description": "",
"options": {
"language": "yaml"
}
},
{
"snippetName": "splice-literal-marker-apps-app-src-pack-examples-sv-helm-sv-values-docs-pruning-start",
"sourceRepo": "splice",
"sourceFilepath": "apps/app/src/pack/examples/sv-helm/sv-values.yaml",
"location": {
"type": "stringMarker",
"start": "DOCS_PRUNING_START",
"end": "DOCS_PRUNING_END"
},
"description": "",
"options": {
"language": "yaml"
}
},
{
"snippetName": "splice-literal-marker-apps-app-src-pack-examples-sv-helm-validator-values-auto-accept-start",
"sourceRepo": "splice",
"sourceFilepath": "apps/app/src/pack/examples/sv-helm/validator-values.yaml",
"location": {
"type": "stringMarker",
"start": "AUTO_ACCEPT_START",
"end": "AUTO_ACCEPT_END"
},
"description": "",
"options": {
"language": "yaml"
}
},
{
"snippetName": "splice-literal-marker-apps-app-src-pack-examples-sv-helm-validator-values-enablewallet-start",
"sourceRepo": "splice",
"sourceFilepath": "apps/app/src/pack/examples/sv-helm/validator-values.yaml",
"location": {
"type": "stringMarker",
"start": "ENABLEWALLET_START",
"end": "ENABLEWALLET_END"
},
"description": "",
"options": {
"language": "yaml"
}
},
{
"snippetName": "splice-literal-marker-apps-app-src-pack-examples-sv-helm-validator-values-participant-pruning-schedule-start",
"sourceRepo": "splice",
"sourceFilepath": "apps/app/src/pack/examples/sv-helm/validator-values.yaml",
"location": {
"type": "stringMarker",
"start": "PARTICIPANT_PRUNING_SCHEDULE_START",
"end": "PARTICIPANT_PRUNING_SCHEDULE_END"
},
"description": "",
"options": {
"language": "yaml"
}
},
{
"snippetName": "splice-literal-marker-cluster-helm-splice-cometbft-values-template-docs-cometbft-pruning-start",
"sourceRepo": "splice",
"sourceFilepath": "cluster/helm/splice-cometbft/values-template.yaml",
"location": {
"type": "stringMarker",
"start": "DOCS_COMETBFT_PRUNING_START",
"end": "DOCS_COMETBFT_PRUNING_END"
},
"description": "",
"options": {
"language": "yaml"
}
}
]
}
Loading
Loading