Skip to content

Commit 2dd3e60

Browse files
committed
Merge branch 'issue_1210-wiki-gone'
2 parents 2f905f0 + fbfb6f2 commit 2dd3e60

File tree

3 files changed

+14
-36
lines changed

3 files changed

+14
-36
lines changed

.github/workflows/wiki.yaml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ on:
77
- '.github/workflows/wiki.yaml'
88
- 'wiki/**'
99
- src/rez/rezconfig.py
10-
env:
11-
CLONE_URL: "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.wiki.git"
1210

1311
jobs:
1412
build:
@@ -29,10 +27,9 @@ jobs:
2927
run: |
3028
rezver=$(cat ./src/rez/utils/_version.py | grep -w _rez_version | tr '"' ' ' | awk '{print $NF}')
3129
32-
python update-wiki.py \
30+
python generate-wiki.py \
3331
--github-repo="${{ github.repository }}" \
3432
--github-release=${rezver} \
35-
--wiki-url="${{ env.CLONE_URL }}" \
3633
--out="${{ github.workspace }}/out"
3734
3835
- uses: actions/upload-artifact@v2
@@ -47,20 +44,22 @@ jobs:
4744
if: github.event_name == 'release'
4845

4946
steps:
50-
- uses: actions/download-artifact@v2
51-
with:
52-
name: wiki-markdown
53-
path: .
54-
5547
- name: Setup git config
5648
run: |
5749
git config --global user.name "github.com/${{ github.actor }}"
5850
git config --global user.email "${{ github.actor }}@${{ github.sha }}"
5951
60-
- name: Git commit and push
52+
- name: Clone latest wiki repo
53+
run: |
54+
git clone https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.wiki.git .
55+
56+
- uses: actions/download-artifact@v2
57+
with:
58+
name: wiki-markdown
59+
path: .
60+
61+
- name: Push wiki updates to git
6162
run: |
62-
git commit \
63-
-m "Generated from GitHub "${{ github.workflow }}" Workflow" \
64-
&& git remote set-url origin "${{ env.CLONE_URL }}" \
65-
&& git push origin master \
66-
|| echo "Nothing new to commit"
63+
git add --all
64+
git commit -m "Generated from GitHub ${{ github.workflow }} Workflow"
65+
git push origin master || echo "Nothing new to commit"
Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
GITHUB_REPO = "unknown/rez"
3333
GITHUB_BRANCH = "master"
3434
GITHUB_WORKFLOW = "Wiki"
35-
CLONE_URL = None
3635

3736

3837
def add_toc(txt):
@@ -432,12 +431,6 @@ def __init__(self, **kwargs):
432431
dest="workflow",
433432
help="Name of GitHub workflow that is generating the Wiki"
434433
)
435-
self.add_argument(
436-
"--wiki-url",
437-
default=CLONE_URL,
438-
dest="url",
439-
help="Use this url to git clone wiki from"
440-
)
441434
self.add_argument(
442435
"--out",
443436
default=OUT_DIR,
@@ -456,22 +449,15 @@ def __init__(self, **kwargs):
456449
raise
457450

458451
args = UpdateWikiParser().parse_args()
459-
CLONE_URL = args.url
460452
GITHUB_RELEASE = args.release
461453
GITHUB_REPO = args.repo
462454
GITHUB_BRANCH = args.branch
463455
GITHUB_WORKFLOW = args.workflow
464456
OUT_DIR = os.path.abspath(args.dir)
465457

466-
if not CLONE_URL:
467-
CLONE_URL = "git@github.com:%s.wiki.git" % GITHUB_REPO
468-
469458
if not os.path.exists(OUT_DIR):
470459
os.makedirs(OUT_DIR)
471460

472-
subprocess.check_call(
473-
["git", "clone", "--no-checkout", CLONE_URL, OUT_DIR]
474-
)
475461
shutil.copytree(
476462
os.path.join(THIS_DIR, 'media'),
477463
os.path.join(OUT_DIR, 'media'),

wiki/pages/Home.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
[[media/rez_banner_128.png]]
2-
3-
- [What Is Rez?](#what-is-rez)
4-
- [The Basics](#the-basics)
5-
- [Examples](#examples)
6-
7-
81
## What Is Rez?
92

103
Rez is a cross-platform package manager with a difference. Using Rez you can create

0 commit comments

Comments
 (0)