-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from SuperKogito/add-kbes
Add KBES
- Loading branch information
Showing
5 changed files
with
103 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Build and Deploy Sphinx Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_run: | ||
workflows: ["Urls checking"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.7' | ||
|
||
- name: Install dependencies | ||
run: | | ||
cd src | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Build Sphinx documentation | ||
run: | | ||
cd src | ||
make html | ||
- name: Deploy to GitHub Pages | ||
if: success() | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Validate JSON | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'src/ser-datasets.json' | ||
|
||
jobs: | ||
validate-json: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.7' | ||
|
||
- name: Install dependencies | ||
run: | | ||
cd src | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Validate JSON | ||
run: | | ||
cd src | ||
python validate_json.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import json | ||
import sys | ||
|
||
def validate_json(file_path): | ||
try: | ||
with open(file_path, 'r') as f: | ||
json.load(f) | ||
print(f"JSON file at {file_path} is valid.") | ||
except json.JSONDecodeError as e: | ||
print(f"Invalid JSON file at {file_path}: {e}") | ||
sys.exit(1) | ||
except Exception as e: | ||
print(f"Error reading JSON file at {file_path}: {e}") | ||
sys.exit(1) | ||
|
||
|
||
if __name__ == "__main__": | ||
validate_json('ser-datasets.json') |