Skip to content

Commit c474099

Browse files
Split to two workflows (TheSuperHackers#26)
1 parent 37d00b4 commit c474099

File tree

3 files changed

+70
-67
lines changed

3 files changed

+70
-67
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish Asset to Wiki
2+
# Credit: https://nimblehq.co/blog/create-github-wiki-pull-request
3+
on:
4+
push:
5+
paths:
6+
- 'Asset/**'
7+
branches:
8+
- main
9+
10+
jobs:
11+
publish_asset_to_wiki:
12+
name: Publish Asset to Wiki
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 30
15+
steps:
16+
- name: Checkout source code
17+
uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.head_ref }}
20+
21+
- name: Pull wiki
22+
run: |
23+
mkdir tmp_wiki
24+
cd tmp_wiki
25+
git init
26+
git remote add origin https://${{ secrets.WIKI_ACTION_TOKEN }}@github.com/TheSuperHackers/GeneralsGamePatch.wiki.git
27+
git pull origin master
28+
29+
- name: Push wiki
30+
run: |
31+
rsync -av --delete .github/wiki/Asset/ tmp_wiki/ --exclude .git
32+
cd tmp_wiki
33+
git add .
34+
git commit -m "Update Wiki content"
35+
git push origin master

.github/workflows/publish_docs_to_wiki.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish SourceCode to Wiki
2+
# Credit: https://nimblehq.co/blog/create-github-wiki-pull-request
3+
on:
4+
push:
5+
paths:
6+
- 'SourceCode/**'
7+
branches:
8+
- main
9+
10+
jobs:
11+
publish_sourcecode_to_wiki:
12+
name: Publish SourceCode to Wiki
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 30
15+
steps:
16+
- name: Checkout source code
17+
uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.head_ref }}
20+
21+
- name: Pull wiki
22+
run: |
23+
mkdir tmp_wiki
24+
cd tmp_wiki
25+
git init
26+
git remote add origin https://${{ secrets.WIKI_ACTION_TOKEN }}@github.com/TheSuperHackers/GeneralsGameCode.wiki.git
27+
git pull origin master
28+
29+
- name: Push wiki
30+
run: |
31+
rsync -av --delete .github/wiki/SourceCode/ tmp_wiki/ --exclude .git
32+
cd tmp_wiki
33+
git add .
34+
git commit -m "Update Wiki content"
35+
git push origin master

0 commit comments

Comments
 (0)