File tree Expand file tree Collapse file tree 3 files changed +69
-0
lines changed Expand file tree Collapse file tree 3 files changed +69
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish docs to Wiki
2
+ # Credit: https://nimblehq.co/blog/create-github-wiki-pull-request
3
+ on :
4
+ push :
5
+ paths :
6
+ - ' Asset/**'
7
+ - ' SourceCode/**'
8
+ branches :
9
+ - main
10
+
11
+ jobs :
12
+ publish_asset_to_wiki :
13
+ name : Publish Asset to Wiki
14
+ runs-on : ubuntu-latest
15
+ timeout-minutes : 30
16
+ if : github.event.head_commit.changed_files != 0 && contains(github.event.head_commit.modified, 'Asset/')
17
+ steps :
18
+ - name : Checkout source code
19
+ uses : actions/checkout@v4
20
+ with :
21
+ ref : ${{ github.head_ref }}
22
+
23
+ - name : Pull wiki
24
+ run : |
25
+ mkdir tmp_wiki
26
+ cd tmp_wiki
27
+ git init
28
+ git remote add origin https://${{ secrets.WIKI_ACTION_TOKEN }}@github.com/TheSuperHackers/GeneralsGamePatch.wiki.git
29
+ git pull origin master
30
+
31
+ - name : Push wiki
32
+ run : |
33
+ rsync -av --delete .github/wiki/Asset/ tmp_wiki/ --exclude .git
34
+ cd tmp_wiki
35
+ git add .
36
+ git commit -m "Update Wiki content"
37
+ git push origin master
38
+
39
+ publish_sourcecode_to_wiki :
40
+ name : Publish SourceCode to Wiki
41
+ runs-on : ubuntu-latest
42
+ timeout-minutes : 30
43
+ if : github.event.head_commit.changed_files != 0 && contains(github.event.head_commit.modified, 'SourceCode/')
44
+ steps :
45
+ - name : Checkout source code
46
+ uses : actions/checkout@v4
47
+ with :
48
+ ref : ${{ github.head_ref }}
49
+
50
+ - name : Pull wiki
51
+ run : |
52
+ mkdir tmp_wiki
53
+ cd tmp_wiki
54
+ git init
55
+ git remote add origin https://${{ secrets.WIKI_ACTION_TOKEN }}@github.com/TheSuperHackers/GeneralsGameCode.wiki.git
56
+ git pull origin master
57
+
58
+ - name : Push wiki
59
+ run : |
60
+ rsync -av --delete .github/wiki/SourceCode/ tmp_wiki/ --exclude .git
61
+ cd tmp_wiki
62
+ git add .
63
+ git commit -m "Update Wiki content"
64
+ git push origin master
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ <!-- markdownlint-disable -->
2
+ ### Want to contribute to this Wiki?
3
+
4
+ [ Fork it and send a pull request.] ( https://github.com/TheSuperHackers/GeneralsWiki.git )
5
+ <!-- markdownlint-restore -->
You can’t perform that action at this time.
0 commit comments