forked from hyschive/gamer-fork
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.2 KB
/
update_all_parameter_page.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Update all parameters wiki page
on:
workflow_dispatch:
push:
paths:
- 'example/test_problem/Template/Input__Parameter'
- 'tool/wiki/sync_runtime_parameter.py'
- 'src/Init/Init_Load_Parameter.cpp'
env:
GIT_AUTHOR_NAME: ${{ github.actor }}
GIT_AUTHOR_EMAIL: ${{ secrets.MY_EMAIL }}
jobs:
Update-all-parameters-page:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
token: ${{ secrets.TOKEN_FOR_WIKI }}
- name: run script
run: |
cd tool/wiki
python --version
python sync_runtime_parameter.py
- name: move markdown
run: |
mv tool/wiki/Runtime-Parameters:-All.md doc/wiki/
- name: set git config
run: |
git config --global user.email "${{env.GIT_AUTHOR_NAME}}"
git config --global user.name "${{env.GIT_AUTHOR_EMAIL}}"
- name: make a commit and push if the file changed
run: |
git diff --exit-code doc/wiki/Runtime-Parameters:-All.md || \
( git add doc/wiki/Runtime-Parameters:-All.md && \
git commit -m "[Workflow] Update all parameters wiki page" && \
git push )