Skip to content

Commit

Permalink
fix(Github Action): Schema validation and new build action
Browse files Browse the repository at this point in the history
  • Loading branch information
caviri committed Sep 8, 2024
1 parent a551057 commit 47f46d4
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 19 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/build_page.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build page

on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'src/*'

permissions:
contents: write

jobs:
build-index:
runs-on: ubuntu-latest
if: github.event.repository.fork == false

steps:
- name: Checkout main
uses: actions/checkout@v4
with:
fetch-depth: 2
ref: 'main'
path: main

- name: Checkout gh-pages
uses: actions/checkout@v4
with:
fetch-depth: 2
ref: 'gh-pages'
path: gh-pages

- name: Copying src
run: cp -r main/src/* gh-pages/

- name: Get last commit message - gh-pages
id: last-commit-message-gh-pages
run: echo "msg=$(git -C gh-pages log -1 --pretty=%s)" >> $GITHUB_OUTPUT

- name: Commit - gh-pages
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: ${{ steps.last-commit-message-gh-pages.outputs.msg }}
commit_options: '--amend --no-edit'
push_options: '--force'
skip_fetch: true
repository: gh-pages
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,20 @@ Each of these assets type has one basic metadata file requested.
3. Fill the template with all requested data and start a Pull Request (PR) to this repository.
4. This will open a discussion thread with the community and moderators of the hub.
5. The PR approval will trigger a github action, validating the item added.
6.
6. The action will render the new information in the page


#### How to add a new project to this Hub?

TBD

#### How to add a new datasets/model/publication to the Hub?

TBD

### How the community can add a new research asset type?

Addidn or editing a research schema is as easy a modifying one of the files located in `/catalog/schemas`
Adding or editing a research schema is as easy a modifying one of the files located in `/catalog/schemas`

### How the community can add a new webapp?

Expand Down
4 changes: 2 additions & 2 deletions catalog/datasets/0001-pneuma-dataset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ tags:
- "drone"
source: "Zenodo"
authors:
name: "Kim, Sohyeong"
orcid: "0000-0000-0000-0000"
- name: "Kim, Sohyeong"
orcid: "0000-0000-0000-0000"
license: "CC BY 4.0"
access_url: "https://zenodo.org/record/7426506/"
documentation_url: "https://zenodo.org/record/7426506"
4 changes: 2 additions & 2 deletions catalog/datasets/0002-pneuma-vision-dataset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ tags:
- "traffic safety"
source: "Zenodo"
authors:
name: "Barmpounakis, Emmanouil"
orcid: "0000-0000-0000-0000"
- name: "Barmpounakis, Emmanouil"
orcid: "0000-0000-0000-0000"
license: "CC BY 4.0"
access_url: "https://zenodo.org/record/10491409"
documentation_url: "https://zenodo.org/record/10491409"
25 changes: 14 additions & 11 deletions catalog/schemas/datasets.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,22 @@
"description": "The source or origin of the dataset"
},
"authors": {
"type": "object",
"type": "array",
"description": "The authors or creators of the dataset",
"properties": {
"name": {
"type": "string",
"description": "Name of the author of the dataset"
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the author of the dataset"
},
"orcid": {
"type": "string",
"description": "ORCID of the researcher author of the dataset"
}
},
"orcid": {
"type": "string",
"description": "ORCID of the researcher author of the dataset"
}
},
"required": ["name"]
"required": ["name"]
}
},
"license": {
"type": "string",
Expand Down
4 changes: 2 additions & 2 deletions catalog/templates/datasets_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ tags:
- tag 3
source: "National Meteorological Organization"
authors:
name: "Dr. Jane Doe"
orcid: "0000-0002-1825-0097"
- name: "Dr. Jane Doe"
orcid: "0000-0002-1825-0097"
license: "CC BY 4.0"
access_url: "https://example.com/datasets/...."
documentation_url: "https://example.com/datasets/...."
Expand Down

0 comments on commit 47f46d4

Please sign in to comment.