Skip to content

Commit 0e08abc

Browse files
JeffreyDallasswirlds-automationjeromy-cannon
authored
feat: update readme and hugo workflow (#930)
Signed-off-by: Jeffrey Tang <[email protected]> Signed-off-by: Swirlds Automation <[email protected]> Signed-off-by: Jeromy Cannon <[email protected]> Co-authored-by: Swirlds Automation <[email protected]> Co-authored-by: Jeromy Cannon <[email protected]>
1 parent f546a79 commit 0e08abc

27 files changed

+1478
-1160
lines changed

.github/workflows/flow-hugo-publish.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ on:
2929
- '**/*.js'
3030
- '**/*.ts'
3131
- '**/package*.json'
32+
- 'docs/content/User/*.md'
3233
- 'DEV.md'
3334
- 'README.md'
3435
# run in the pull request, but don't publish

.github/workflows/script/update_md.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/bin/bash
2+
3+
# This script is used to run some common solo commands, and use the output to update
4+
# the docs/content/User/StepByStepGuide.md file. This is useful to keep the guide up to date
5+
26
set -xeo pipefail
37
export SOLO_CLUSTER_NAME=solo
48
export SOLO_NAMESPACE=solo
@@ -38,12 +42,12 @@ echo "Generate README.md"
3842
envsubst '$KIND_CREATE_CLUSTER_OUTPUT,$SOLO_INIT_OUTPUT,$SOLO_NODE_KEY_PEM_OUTPUT,$SOLO_CLUSTER_SETUP_OUTPUT, \
3943
$SOLO_NETWORK_DEPLOY_OUTPUT,$SOLO_NODE_SETUP_OUTPUT,$SOLO_NODE_START_OUTPUT,$SOLO_MIRROR_NODE_DEPLOY_OUTPUT,\
4044
$SOLO_RELAY_DEPLOY_OUTPUT'\
41-
< README.md.template > README.md
45+
< docs/content/User/StepByStepGuide.md.template > docs/content/User/StepByStepGuide.md
4246

4347
echo "Remove color codes and lines showing intermediate progress"
4448

45-
sed -i 's/\[32m//g' README.md
46-
sed -i 's/\[33m//g' README.md
47-
sed -i 's/\[39m//g' README.md
48-
egrep -v '↓|❯|•' README.md > README.md.tmp && mv README.md.tmp README.md
49+
sed -i 's/\[32m//g' docs/content/User/StepByStepGuide.md
50+
sed -i 's/\[33m//g' docs/content/User/StepByStepGuide.md
51+
sed -i 's/\[39m//g' docs/content/User/StepByStepGuide.md
52+
egrep -v '↓|❯|•' docs/content/User/StepByStepGuide.md > docs/content/User/StepByStepGuide.md.tmp && mv docs/content/User/StepByStepGuide.md.tmp docs/content/User/StepByStepGuide.md
4953
set +x

.github/workflows/zxc-update-readme.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
##
1616

1717
name: Update README.md
18+
19+
# This workflow calls script update_md.sh to update the docs/content/User/StepByStepGuide.md file
1820
on:
21+
workflow_dispatch:
1922
workflow_call:
2023
secrets:
2124
GH_ACCESS_TOKEN:
@@ -92,7 +95,7 @@ jobs:
9295
sudo apt-get update
9396
sudo apt-get install gettext-base
9497
95-
- name: Update README.md
98+
- name: Update docs/content/User/StepByStepGuide.md
9699
run: |
97100
set -xeo pipefail
98101
npm install
@@ -107,7 +110,7 @@ jobs:
107110
./.github/workflows/script/update_md.sh </dev/null | cat
108111
set +x
109112
110-
- name: Check README.md Changes
113+
- name: Check docs/content/User/StepByStepGuide.md Changes
111114
id: check-readme-changes
112115
run: |
113116
CHANGES=$(git diff --stat)
@@ -138,15 +141,15 @@ jobs:
138141
git_user_signingkey: true
139142
git_commit_gpgsign: true
140143

141-
- name: Commit README.md Changes
144+
- name: Commit docs/content/User/StepByStepGuide.md Changes
142145
id: commit-readme
143146
if : ${{ github.event.inputs.dry-run-enabled != 'true' && !cancelled() && !failure() && inputs.commit-changes }}
144147
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
145148
with:
146-
commit_message: "auto update README.md [skip ci]"
149+
commit_message: "auto update docs/content/User/StepByStepGuide.md [skip ci]"
147150
commit_options: '--no-verify --signoff'
148151
add_options: '-u'
149-
file_pattern: 'README.md'
152+
file_pattern: 'docs/content/User/StepByStepGuide.md'
150153
commit_user_name: Swirlds Automation
151154
commit_user_email: [email protected]
152155
commit_author: Swirlds Automation <[email protected]>

0 commit comments

Comments
 (0)