This is a gh-action to generate a GitHub Pages site from a github repo containing a RO-Crate.
Construct a config.yml file using the flowchart below. The config.yml file should be in the root of the repo.
- name: RO-Crate to Pages
uses:
- ro-crate-to-pages@v1
with:
config: .config.yml
full yml example of a workflow file that will run the action on push
name: RO-Crate to Pages
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: RO-Crate to Pages
uses: vliz-be-opsci/rocrate-to-pages@latest
with:
config: .config.yml
# Deploy to GH-Pages branch
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./unicornpages
-
multiple_rocrates
: if true, the action will look for multiple rocrates in the repo, and generate a page for each of them. If false, it will only look for one rocrate in the repo, and generate a page for that one. -
RELEASE_management
: if true, the action will look for a release, and generate a page for that release. If false, it will generate a page for the latest commit on the main branch. -
RELEASE_verioning
: ifRELEASE_management
is true, this will determine how the action will look for the release. Iftag
, it will look for the latest release by tag. Ifrelease
, it will look for the latest release by release. -
INCLUDE_draft
: ifRELEASE_management
is true, this will determine if the action will include the draft release. Iftrue
, it will include the draft release. Iffalse
, it will not include the draft release. -
index_html: if
true
, the action will generate an index.html file for each rocrate. Iffalse
, it will not generate an index.html file for each rocrate. -
draft_folder_name: if
RELEASE_management
is true, andINCLUDE_draft
is true, this will determine the name of the folder for the draft release. Ifdraft
, the folder will be nameddraft
. Ifdraft_release
, the folder will be nameddraft_release
. -
theme: if filled in this will be the theme used for the generated pages. If not filled in, the default theme will be used. Currently available themes:
!important note: multiple_rocrates and RELEASE_management are mutually exclusive. If multiple_rocrates is true, RELEASE_management will be ignored.!
multiple_rocrates
: falseRELEASE_management
: trueRELEASE_versioning
: tagINCLUDE_draft
: trueindex_html
: truedraft_folder_name
: drafttheme
: dark
# config.yml
multiple_rocrates: false
RELEASE_management: true
RELEASE_versioning: tag #by major tag or by release
INCLUDE_draft: true #include draft release which is the latest commit on the main branch
index_html: true #generate an index.html file for each rocrate
draft_folder_name: draft #name of the folder for the draft release
theme: dark #theme used for the generated pages
multiple_rocrates
: trueRELEASE_management
: falseindex_html
: false
# config.yml
multiple_rocrates: true
RELEASE_management: false
index_html: false
The action will generate documents for the gh-pages branch. Depending on the configuration, the action will generate a page for each rocrate in the repo, or a page for the latest release.
multiple_rocrates
: falseRELEASE_management
: trueRELEASE_verioning
: tagINCLUDE_draft
: trueindex_html
: true
# outputs
gh-pages (branch)
- 0.1 (folder)
- index.html
- ro-crate-metadata.jsonld
- ro-crate-preview.html
- all_folders_and_files_in_repo
- 0.2 (folder)
- index.html
- ro-crate-metadata.jsonld
- ro-crate-preview.html
- all_folders_and_files_in_repo
- draft (folder)
- index.html
- ro-crate-metadata.jsonld
- ro-crate-preview.html
- all_folders_and_files_in_repo
- index.html
multiple_rocrates
: trueRELEASE_management
: falseindex_html
: false
# outputs
gh-pages (branch)
- rocrate1 (folder)
- index.html
- ro-crate-metadata.jsonld
- ro-crate-preview.html
- all_folders_and_files_in_repo
- rocrate2 (folder)
- index.html
- ro-crate-metadata.jsonld
- ro-crate-preview.html
- all_folders_and_files_in_repo
- rocrate3 (folder)
- index.html
- ro-crate-metadata.jsonld
- ro-crate-preview.html
- all_folders_and_files_in_repo
The action and documentation in this project are released under the MIT License