File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed
Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ # Copyright (c) 2026 Morwenn
2+ # SPDX-License-Identifier: MIT
3+
4+ name : Wiki Deployment
5+
6+ on :
7+ push :
8+ branches :
9+ - trunk
10+ paths :
11+ - ' docs/**'
12+ workflow_dispatch :
13+
14+ jobs :
15+ sync-wiki-files :
16+ name : Sync Wiki Files
17+
18+ runs-on : codeberg-tiny-lazy
19+
20+ steps :
21+ - name : Checkout /docs
22+ uses : actions/checkout@v6
23+ with :
24+ repository : ${{forgejo.repository}}
25+ path : main
26+
27+ - name : Checkout wiki
28+ uses : actions/checkout@v4
29+ with :
30+ repository : ${{forgejo.repository}}.wiki
31+ path : wiki
32+
33+ - name : Sync wiki files
34+ run : |
35+ apt-get update
36+ apt-get install -y rsync
37+ for docname in main/docs/*.md; do
38+ old=$(basename "$docname");
39+ new=${old%.*};
40+ find main/docs -name "*.md" -exec sed -i "s/$old/$new/g" {} \;
41+ done
42+ rsync -avzr --delete --exclude='.git/' "main/docs/" "wiki/"
43+
44+ - name : Commit changes
45+ working-directory : wiki
46+ run : |
47+ git config --local user.email "[email protected] " 48+ git config --local user.name "Forgejo Action"
49+ git add .
50+ git commit -m "Synchronize wiki with docs/"
51+
52+ - name : Push changes to wiki
53+ working-directory : wiki
54+ run : |
55+ git push
You can’t perform that action at this time.
0 commit comments