Skip to content

Commit

Permalink
chore: deploy D22B under /D22B path
Browse files Browse the repository at this point in the history
  • Loading branch information
kshychko committed Jul 26, 2024
1 parent 80b3a75 commit 2d2296a
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 25 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
name: Deploy site preview to AWS S3

on:
# Runs on pull requests against main branch
pull_request:
branches:
- main
# Manually run the deployment
workflow_dispatch

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
Expand Down Expand Up @@ -44,6 +42,6 @@ jobs:
- name: "Build Site"
run: JEKYLL_ENV=production 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/ --cache-control max-age=604800
run: aws s3 sync ./_site/ s3://uncefact-vocab-preview-sam-bucket-private/D22B --delete --cache-control max-age=604800
- name: "Create CloudFront invalidation"
run: aws cloudfront create-invalidation --distribution-id "E32QP2QS6SXRHC" --paths "/*"
run: aws cloudfront create-invalidation --distribution-id "E32QP2QS6SXRHC" --paths "/D22B/*"
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: "Build Site"
run: JEKYLL_ENV=production bundle exec jekyll build --config _config.yml
- name: "Deploy to AWS S3"
run: aws s3 sync ./_site/ s3://uncefact-vocab-preview-sam-bucket-private/ --cache-control max-age=604800
run: aws s3 sync ./_site/ s3://vocabulary-uncefact-sam-private/D22B --delete --cache-control max-age=604800
- name: "Create CloudFront invalidation"
run: aws cloudfront create-invalidation --distribution-id "E1RCVDSPUMB7H2" --paths "/*"
run: aws cloudfront create-invalidation --distribution-id "E1RCVDSPUMB7H2" --paths "/D22B/*"

6 changes: 3 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Site settings
title: Vocabulary UNECE
baseurl: "" # the subpath of your site, e.g. /blog
baseurl: "/D22B" # the subpath of your site, e.g. /blog

dataSet: "dataset:'22B'"
dataSet: "dataset:'D22B'"
versions:
bsp: D22B
un-locodes: v2022-2

markdown: kramdown
kramwdown:
parse_block_html: true
Expand Down
5 changes: 2 additions & 3 deletions _config_preview.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Site settings
title: Vocabulary UNECE
baseurl: "/22B" # the subpath of your site, e.g. /blog
baseurl: "/D22B" # the subpath of your site, e.g. /blog

dataSet: "dataset:'22A'"
dataSet: "dataset:'D22B'"
versions:
bsp: D22B
un-locodes: v2022-2

markdown: kramdown
kramwdown:
parse_block_html: true
Expand Down
12 changes: 6 additions & 6 deletions _data/mapping.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"unece": "/",
"unece": "/D22B/",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"owl": "http://www.w3.org/2002/07/owl#",
"schema": "http://schema.org/",
"unlcd": "/unlocode#",
"unlcdc": "/unlocode-countries#",
"unlcdf": "/unlocode-functions#",
"unlcds": "/unlocode-subdivisions#",
"unlcdv": "/unlocode-vocabulary#"
"unlcd": "/D22B/unlocode#",
"unlcdc": "/D22B/unlocode-countries#",
"unlcdf": "/D22B/unlocode-functions#",
"unlcds": "/D22B/unlocode-subdivisions#",
"unlcdv": "/D22B/unlocode-vocabulary#"
}
2 changes: 1 addition & 1 deletion _includes/breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% assign pageType = page.collection %}
<div class="breadcrumbs">
{% assign crumbs = page.url | remove:'/index.html' | split: '/' %}
<a href="/">Home</a>
<a href="/D22B/home">Home</a>
{% if pageType == 'unlocode-lists' %}
/ <a href="{{ 'unlocode-about' | absolute_url }}">UN/LOCODEs</a>
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<header class="header">
<div class="header__content">
<div class="header__logo">
<a href="/home" class="header__logo-link">
<a href="/D22B/home" class="header__logo-link">
<img src="{{site.baseurl}}/images/logo.png" class="header__logo-img" alt="">
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/unlocode.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

window.location.href = url.origin + url.pathname + '?country=' + countryCode + url.hash;
} else {
window.location.href = url.origin + '/unlocode-countries';
window.location.href = url.origin + '/D22B/unlocode-countries';
}

</script>
4 changes: 2 additions & 2 deletions pages/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ <h1 class="home-content__title">UN/CEFACT Web Vocabulary</h1>
<h2 class="home-content__subtitle">Contexts</h2>
<p>JSON-LD Context files are available here:</p>
<p>
<a class="link-box" href="https://vocabulary.uncefact.org/D22A/unece-context.jsonld">https://vocabulary.uncefact.org/D22A/unece-context.jsonld</a>
<a class="link-box" href="https://vocabulary.uncefact.org/D22B/unece-context.jsonld">https://vocabulary.uncefact.org/D22B/unece-context.jsonld</a>
</p>

<h2 class="home-content__subtitle">Content Negotiation</h2>
<div class="copy-box">
<div class="copy-box__text" id="content-negotiation-1">
curl https://vocabulary.uncefact.org/D22A/ -H 'Accept: application/ld+json'
curl https://vocabulary.uncefact.org/D22B/ -H 'Accept: application/ld+json'
</div>
<button type="button" class="js-copy-btn copy-box__btn" data-clipboard-target="#content-negotiation-1">
<svg class="copy-box__btn-icon">
Expand Down

0 comments on commit 2d2296a

Please sign in to comment.