Skip to content

Commit

Permalink
feat: intial dpp setup
Browse files Browse the repository at this point in the history
  • Loading branch information
kshychko committed Aug 25, 2024
1 parent e691218 commit 9e59fc0
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# documentation.

# Sample workflow for building and deploying a Jekyll site to AWS S3
name: preview (untp-dcc-pages)
name: preview (untp-dpp-pages)

on:
push:
branches:
- untp-dcc-pages
- untp-dpp-pages

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
Expand All @@ -19,7 +19,7 @@ permissions:

# Allow one concurrent deployment
concurrency:
group: "untp-dcc-pages"
group: "untp-dpp-pages"
cancel-in-progress: true

env:
Expand All @@ -41,7 +41,7 @@ jobs:
- id: set-env
name: output a major_version for the release
run: |
major_version=$(cat _config_preview.yml | yq e '.versions.untp-dcc' | cut -d. -f1)
major_version=$(cat _config_preview.yml | yq e '.versions.untp-dpp' | cut -d. -f1)
echo "major_version=$major_version" >> "$GITHUB_OUTPUT"
- name: Print the major_version
run: |
Expand All @@ -50,9 +50,9 @@ jobs:
run: bundle install
- name: "Build Site"
run: |
yq -i '.baseurl="/vocabulary/untp/dcc/${{ steps.set-env.outputs.major_version }}"' _config_preview.yml
yq -i '.baseurl="/vocabulary/untp/dpp/${{ steps.set-env.outputs.major_version }}"' _config_preview.yml
bundle exec jekyll build --config _config_preview.yml
- name: "Deploy to AWS S3"
run: |
aws s3 sync ./_site/ s3://uncefact-vocab-preview-sam-bucket-private/vocabulary/untp/dcc/${{ steps.set-env.outputs.major_version }} --cache-control max-age=604800
aws cloudfront create-invalidation --distribution-id "E32QP2QS6SXRHC" --paths "/vocabulary/untp/dcc/${{ steps.set-env.outputs.major_version }}/*"
aws s3 sync ./_site/ s3://uncefact-vocab-preview-sam-bucket-private/vocabulary/untp/dpp/${{ steps.set-env.outputs.major_version }} --cache-control max-age=604800
aws cloudfront create-invalidation --distribution-id "E32QP2QS6SXRHC" --paths "/vocabulary/untp/dpp/${{ steps.set-env.outputs.major_version }}/*"
6 changes: 3 additions & 3 deletions _config_preview.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Site settings
title: Vocabulary UNTP DCC
baseurl: "/vocabulary/untp/dcc" # the subpath of your site, e.g. /blog
title: Vocabulary UNTP DPP
baseurl: "/vocabulary/untp/dpp" # the subpath of your site, e.g. /blog
dest: "https://test.uncefact.org"
dataSet: "dataset:'22A'"
versions:
untp-dcc: 0.3.7
untp-dpp: 0.0.0
markdown: kramdown
kramwdown:
parse_block_html: true
Expand Down
26 changes: 13 additions & 13 deletions _data/versions.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
{
"majors": [
{
"prefix": "/vocabulary/untp/dcc/0/",
"prefix": "/vocabulary/untp/dpp/0/",
"major": 0,
"log":[
{
"version": "v0.3.7",
"date": "2024-07-24",
"notes": "v0.3.7 - v0.3.7 - bug fix, now references to v0.3.6 core.",
"context": "untp-dcc-context-0.3.7.jsonld",
"schema": "untp-dcc-schema-0.3.7.json"
"context": "untp-dpp-context-0.3.7.jsonld",
"schema": "untp-dpp-schema-0.3.7.json"
},
{
"version": "v0.3.6",
"date": "2024-07-24",
"notes": "v0.3.6 - added sample data, aligned with untp core",
"context": "untp-dcc-context-0.3.6.jsonld",
"json-schema": "untp-dcc-schema-0.3.6.json"
"context": "untp-dpp-context-0.3.6.jsonld",
"json-schema": "untp-dpp-schema-0.3.6.json"
},
{
"version": "v0.3.1",
"date": "2024-07-24",
"notes": "v0.3.1 - bug fixes (@context), moved \"verifiedByCAB\", aligned with lated core vocab.",
"context": "untp-dcc-context-0.3.1.jsonld",
"json-schema": "untp-dcc-schema-0.3.1.json"
"context": "untp-dpp-context-0.3.1.jsonld",
"json-schema": "untp-dpp-schema-0.3.1.json"
},
{
"version": "v0.3.0",
"date": "2024-06-24",
"notes": "v0.3.0 - draft model after separating out and re-building on the untp-core vocabulary.",
"context": "untp-dcc-context-0.3.0.jsonld",
"json-schema": "untp-dcc-schema-0.3.0.json"
"context": "untp-dpp-context-0.3.0.jsonld",
"json-schema": "untp-dpp-schema-0.3.0.json"
},
{
"version": "v0.2.0",
"date": "2024-06-24",
"notes": "v0.2.0 - raw model after initial pilot testing and alignment with UN DPCCE model",
"context": "untp-dcc-context-0.2.0.jsonld",
"json-schema": "untp-dcc-schema-0.2.0.json"
"context": "untp-dpp-context-0.2.0.jsonld",
"json-schema": "untp-dpp-schema-0.2.0.json"
},
{
"version": "v0.0.1",
"date": "2024-06-24",
"notes": "v0.0.1 - Initial Model",
"context": "untp-dcc-context-0.1.0.jsonld",
"json-schema": "untp-dcc-schema-0.1.0.json"
"context": "untp-dpp-context-0.1.0.jsonld",
"json-schema": "untp-dpp-schema-0.1.0.json"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion _includes/breadcrumbs.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% if pageType == 'unlocode-lists' %}
/ <a href="{{ 'unlocode-about' | absolute_url }}">UN/LOCODEs</a>
{% else %}
/ <a href="{{ 'about' | absolute_url }}">Conformity Credential</a>
/ <a href="{{ 'about' | absolute_url }}">Digital Product Passport</a>
{% endif %}
{% if pageType == 'classes' %}
/ <a href="{{ 'classes' | absolute_url }}">Classes</a>
Expand Down
26 changes: 13 additions & 13 deletions pages/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
class: white
---
<div class="home-content">
<h1 class="home-content__title">UNTP B2B Conformity Credential Vocabulary</h1>
<p class="home-content__description">A generic model for a set of verifiable conformity claims about any product or facility or entity or consignment.</p>
<h1 class="home-content__title">UNTP B2B Digital Product Passport Vocabulary</h1>
<p class="home-content__description">A data model for a digital product passport that is designed to provide traceability & transparency into supply chains - with a focus on sustainability measures and outcomes.</p>
<div class="search-block">
<form action="{{ '/search' | prepend: site.baseurl }}" method="get" class="search-block">
<div class="search-block__container">
Expand Down Expand Up @@ -37,12 +37,12 @@ <h1 class="home-content__title">UNTP B2B Conformity Credential Vocabulary</h1>
Classes
</a>
<div class="browse-type__info">
<p class="browse-type__description">List of Conformity Credential Classes</p>
<p class="browse-type__description">List of Digital Product Passport Classes</p>
<a class="browse-type__action" href="{{ 'classes' | absolute_url }}">Browse Classes</a>
</div>
{% if site.versions.untp-dcc %}
{% if site.versions.untp-dpp %}
<span class="browse-type__version">
{{ site.versions.untp-dcc }}
{{ site.versions.untp-dpp }}
</span>
{% endif %}
</li>
Expand All @@ -59,12 +59,12 @@ <h1 class="home-content__title">UNTP B2B Conformity Credential Vocabulary</h1>
Properties
</a>
<div class="browse-type__info">
<p class="browse-type__description">List of Conformity Credential Properties</p>
<p class="browse-type__description">List of Digital Product Passport Properties</p>
<a class="browse-type__action" href="{{ 'properties' | absolute_url }}">Browse Properties</a>
</div>
{% if site.versions.untp-dcc %}
{% if site.versions.untp-dpp %}
<span class="browse-type__version">
{{ site.versions.untp-dcc }}
{{ site.versions.untp-dpp }}
</span>
{% endif %}
</li>
Expand All @@ -81,18 +81,18 @@ <h1 class="home-content__title">UNTP B2B Conformity Credential Vocabulary</h1>
Code Lists
</a>
<div class="browse-type__info">
<p class="browse-type__description">List of Conformity Credential Codes</p>
<p class="browse-type__description">List of Digital Product Passport Codes</p>
<a class="browse-type__action" href="{{ 'code-lists' | absolute_url }}">Browse Code Lists</a>
</div>
{% if site.versions.untp-dcc %}
{% if site.versions.untp-dpp %}
<span class="browse-type__version">
{{ site.versions.untp-dcc }}
{{ site.versions.untp-dpp }}
</span>
{% endif %}
</li>
</ul>

{%- assign jsonld_context_url = '.jsonld' | prepend: site.versions.untp-dcc | prepend: '/untp-dcc-context-' | prepend: site.baseurl | prepend: site.dest -%}
{%- assign jsonld_context_url = '.jsonld' | prepend: site.versions.untp-dpp | prepend: '/untp-dpp-context-' | prepend: site.baseurl | prepend: site.dest -%}
<h2 class="home-content__subtitle">Contexts</h2>
<p>Current JSON-LD Context file is available here:</p>
<p>
Expand All @@ -112,7 +112,7 @@ <h2 class="home-content__subtitle">Content Negotiation</h2>
</button>
</div>

{%- assign json_schema_url = '.json' | prepend: site.versions.untp-dcc | prepend: '/untp-dcc-schema-' | prepend: site.baseurl | prepend: site.dest -%}
{%- assign json_schema_url = '.json' | prepend: site.versions.untp-dpp | prepend: '/untp-dpp-schema-' | prepend: site.baseurl | prepend: site.dest -%}

<h2 class="home-content__subtitle">JSON Shcemas</h2>
<p>Current JSON Schema file is available here:</p>
Expand Down

0 comments on commit 9e59fc0

Please sign in to comment.