Skip to content

Commit f256fe2

Browse files
committed
fix svg's for svgo optimization
1 parent 12d6d2c commit f256fe2

File tree

60 files changed

+8081
-1531
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+8081
-1531
lines changed

.github/workflows/rich-codex.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,31 @@ jobs:
4545
HIDE_PROGRESS: "true"
4646
NXF_ANSI_LOG: false
4747
with:
48-
commit_changes: "true"
48+
commit_changes: "false"
4949
terminal_width: 100
5050
skip_git_checks: "true"
5151
search_include: ".github/workflows/rich-codex.yml"
5252

53+
- name: Decode HTML entities in generated SVGs
54+
run: |
55+
python3 -c "
56+
import re, html, glob
57+
for path in glob.glob('sites/docs/src/assets/images/**/*.svg', recursive=True):
58+
content = open(path).read()
59+
decoded = re.sub(r'&#[0-9]+;|&#x[0-9a-fA-F]+;', lambda m: html.unescape(m.group(0)), content)
60+
if decoded != content:
61+
open(path, 'w').write(decoded)
62+
print(f'Decoded entities in {path}')
63+
"
64+
65+
- name: Commit generated images
66+
run: |
67+
git config user.email "core@nf-co.re"
68+
git config user.name "nf-core-bot"
69+
git add --all
70+
git diff --staged --quiet || git commit -m "[automated] Update rich-codex images"
71+
git push
72+
5373
- name: Restore package.json
5474
run: |
5575
git checkout "$GITHUB_WORKSPACE/package.json"

sites/docs/src/assets/images/contributing/creating_with_nf_core/git_branch.svg

Lines changed: 4 additions & 4 deletions
Loading

sites/docs/src/assets/images/contributing/creating_with_nf_core/git_log.svg

Lines changed: 2 additions & 2 deletions
Loading

sites/docs/src/assets/images/contributing/creating_with_nf_core/git_status.svg

Lines changed: 3 additions & 3 deletions
Loading

0 commit comments

Comments
 (0)