Skip to content

Commit

Permalink
Merge pull request #2 from molssi-ai/web_publish
Browse files Browse the repository at this point in the history
Updating publish action.
  • Loading branch information
bennybp authored Sep 11, 2024
2 parents b72af39 + f81cd6e commit 6404e6f
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 6404e6f

Please sign in to comment.