forked from hyperledger-labs/splice-wallet-kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.78 KB
/
update-docs-snippets.yml
File metadata and controls
49 lines (42 loc) · 1.78 KB
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
name: Update Docs Snippets
on:
workflow_dispatch:
push:
branches:
- main
paths:
- docs/wallet-integration-guide/examples/snippets/**
- docs/wallet-integration-guide/examples/scripts/**
jobs:
update-snippets:
if: vars.ENABLE_SYNC_PROCESS == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Extract Snippet data
run: node docs/scripts/generateOutputDocs.js
- name: Store Artifact output
id: store-artifact
uses: actions/upload-artifact@v7
with:
name: splice-wallet-kernel-snippets
path: docs-output/
env:
main_repo_token: ${{ secrets.SOURCE_REPO_TOKEN }}
- name: Prepare additional params
id: additional-params
run: echo "short_sha=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- 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: ${{ vars.SOURCE_REPO_NAME }}
PAYLOAD_repo-org: ${{ vars.SOURCE_REPO_ORG }}
PAYLOAD_repo-version: ${{ vars.SOURCE_REPO_VERSION }}
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: ${{ secrets.MAIN_DOCS_REPO_TOKEN }}