Skip to content

Commit 0dd263e

Browse files
committed
Docs: add automatic Wiki publishing
1 parent 0a0e26a commit 0dd263e

2 files changed

Lines changed: 59 additions & 0 deletions

File tree

.github/WikiLinks.exe

1.83 MB
Binary file not shown.

.github/workflows/publish-wiki.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Publish wiki
2+
on:
3+
push:
4+
branches: [electronnet_core, main]
5+
workflow_dispatch:
6+
concurrency:
7+
group: publish-wiki
8+
cancel-in-progress: true
9+
permissions:
10+
contents: write
11+
jobs:
12+
publish-wiki:
13+
runs-on: windows-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Remove level 1 headings from Markdown files
17+
shell: bash
18+
run: |
19+
find docs/ -name '*.md' -exec sed -i '1d' {} \;
20+
- name: Move all files to root folder
21+
shell: bash
22+
run: |
23+
mv docs/*/* docs/
24+
- name: Delete unwanted files
25+
shell: bash
26+
run: |
27+
# rm docs/*.xlsm
28+
# rm docs/*.pptx
29+
rm docs/*.shproj
30+
- name: Stripping file extensions....
31+
uses: softworkz/strip-markdown-extensions-from-links-action@main
32+
with:
33+
path: ./docs/
34+
- name: Copy Changelog
35+
shell: bash
36+
run: |
37+
cp Changelog.md docs/RelInfo/ 2>/dev/null || true
38+
- name: Copy images to wiki/wiki folder
39+
shell: bash
40+
run: |
41+
mkdir docs/wiki
42+
cp docs/*.svg docs/wiki/ 2>/dev/null || true
43+
cp docs/*.png docs/wiki/ 2>/dev/null || true
44+
cp docs/*.jpg docs/wiki/ 2>/dev/null || true
45+
cp docs/*.gif docs/wiki/ 2>/dev/null || true
46+
cp docs/*.mp4 docs/wiki/ 2>/dev/null || true
47+
- name: Commit and push changes
48+
run: |
49+
git config --global user.name "GitHub Action"
50+
git config --global user.email "action@github.com"
51+
git add -A
52+
git commit -m "Automatically update Markdown files" || echo "No changes to commit"
53+
- uses: Andrew-Chen-Wang/github-wiki-action@v4.4.0
54+
with:
55+
path: docs/
56+
ignore: |
57+
'**/*.xlsm'
58+
'**/*.pptx'
59+
'**/*.shproj'

0 commit comments

Comments
 (0)