mirror of
https://github.com/firmai/financial-machine-learning.git
synced 2026-08-26 09:18:04 +00:00
setup separate workflow to generate wiki on every push
This commit is contained in:
@@ -33,18 +33,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
|
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
|
||||||
|
|
||||||
- name: execute py script # run the run.py to get the latest data
|
|
||||||
run: |
|
|
||||||
python wiki_gen.py
|
|
||||||
|
|
||||||
- name: Commit & Push changes
|
- name: Commit & Push changes
|
||||||
uses: actions-js/push@master
|
uses: actions-js/push@master
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GIT_TOKEN }}
|
github_token: ${{ secrets.GIT_TOKEN }}
|
||||||
|
|
||||||
- name: Upload Documentation to Wiki
|
|
||||||
uses: SwiftDocOrg/github-wiki-publish-action@v1
|
|
||||||
with:
|
|
||||||
path: "generated_wiki"
|
|
||||||
env:
|
|
||||||
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GIT_TOKEN }}
|
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
name: Wiki-Generator
|
||||||
|
|
||||||
|
# generate wiki page on every push
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Set the job key. The key is displayed as the job name
|
||||||
|
update-repo-status:
|
||||||
|
# Name the Job
|
||||||
|
name: Update repo status for all saved repo
|
||||||
|
# Set the type of machine to run on
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: setup python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.7
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||||
|
|
||||||
|
- name: execute py script # run the run.py to get the latest data
|
||||||
|
run: |
|
||||||
|
python wiki_gen.py
|
||||||
|
|
||||||
|
- name: Upload Documentation to Wiki
|
||||||
|
uses: SwiftDocOrg/github-wiki-publish-action@v1
|
||||||
|
with:
|
||||||
|
path: "generated_wiki"
|
||||||
|
env:
|
||||||
|
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GIT_TOKEN }}
|
||||||
+2
-2
@@ -8,9 +8,9 @@ from git_status import get_repo_list
|
|||||||
|
|
||||||
def get_wiki_status_color(input_text):
|
def get_wiki_status_color(input_text):
|
||||||
if input_text is None or input_text == 'inactive':
|
if input_text is None or input_text == 'inactive':
|
||||||
result_text = ""
|
result_text = ":heavy_multiplication_x:"
|
||||||
else:
|
else:
|
||||||
result_text = ""
|
result_text = ":heavy_check_mark:"
|
||||||
return '<sub>{}</sub>'.format(result_text)
|
return '<sub>{}</sub>'.format(result_text)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user