Skip to content

Commit

Permalink
Updating publish action.
Browse files Browse the repository at this point in the history
  • Loading branch information
test committed Sep 11, 2024
1 parent b72af39 commit f81cd6e
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/generate_json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ jobs:
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: json # The folder the action should deploy.
branch: json
folder: website # The folder the action should deploy.
branch: gh-pages
5 changes: 1 addition & 4 deletions json_generator.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import yaml, glob, json, os

if not os.path.isdir("./json"):
os.mkdir("json")

dataset = {"data": []}
for file in glob.glob("./datasets/*.yaml"):
with open(file, 'r') as yaml_file:
dataset['data'].append(yaml.safe_load(yaml_file))

with open('./json/datasets.json', 'w') as file:
with open('./website/datasets.json', 'w') as file:
file.write(json.dumps(dataset, indent=2))
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f81cd6e

Please sign in to comment.