Skip to content

Commit

Permalink
Merge pull request #1 from ESA-EarthCODE/staging
Browse files Browse the repository at this point in the history
merge latest html changes, use gh-action to build/push docker image
  • Loading branch information
achtsnits authored Apr 4, 2024
2 parents 1f20384 + dc2047f commit 9e19ecd
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 46 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ permissions:
contents: read
pages: write
id-token: write
packages: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

env:
IMAGE_NAME: portal

jobs:
copy:
runs-on: ubuntu-latest
Expand All @@ -44,3 +48,18 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Build image
run: docker build . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
- name: Login ghcr
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: 'Push ghcr'
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
[ "$VERSION" == "main" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM nginx:alpine

COPY . /usr/share/nginx/html
137 changes: 91 additions & 46 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down Expand Up @@ -36,90 +36,99 @@
content="Earth Science Collaborative Open Development Environment"
/>
<meta property="twitter:image" content="/earthcode.png" />
<link
rel="stylesheet"
href="https://unpkg.com/@eox/[email protected]/css/main.css"
/>
<!-- Matomo -->
<script>
var _paq = (window._paq = window._paq || []);
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["requireCookieConsent"]);
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function () {
var u = "https://nix.eox.at/piwik/";
_paq.push(["setTrackerUrl", u + "matomo.php"]);
_paq.push(["setSiteId", "13"]);
var d = document,
g = d.createElement("script"),
s = d.getElementsByTagName("script")[0];
g.async = true;
g.src = u + "matomo.js";
s.parentNode.insertBefore(g, s);
})();
</script>
<!-- End Matomo Code -->
</head>
<body>
<esa-menu enable-login></esa-menu>
<esa-menu></esa-menu>
<esa-header></esa-header>
<esa-navbar
brand-title="EarthCODE"
enable-search
enable-login
></esa-navbar>
<esa-navbar brand-title="EarthCODE"></esa-navbar>
<div class="l-wrapper">
<esa-cover
overline="Welcome to EarthCODE"
title="An Open Science environment for reproducible Earth System research"
background-image="https://www.esa.int/var/esa/storage/images/esa_multimedia/images/2023/11/nourishing_commercial_earth_observation/25191087-1-eng-GB/Nourishing_commercial_Earth_observation_pillars.jpg"
></esa-cover>
<main class="u-py-5">
<esa-main-section
title="EarthCODE Portal"
text="This portal shall provide an entry point to the collaborative development tools and resources, as well as access to community guidelines and open documentation to help researchers adopt FAIR principles in their scientific practice.
<br><br>
Through community and capacity building focused on Open Science, the activity shall promote a trusted collaborative experience of conducting Earth system science."
></esa-main-section>
<div style="display: flex; width: 100%; justify-content: center">
<img src="earthcode.png" style="width: 100%; max-width: 50vw" />
</div>
<esa-main-section
text="For all components (technology, community, partnerships), the Reproducible Open Science Environment can rely on elements developed as part of other FutureEO activities and on readily available operational services provided by Member States’ public and industrial facilities, including interoperable building blocks, platform services, Open Science capacity building, scientific communication, and international cooperation."
></esa-main-section>
<eox-storytelling
markdown-url="./index.md"
no-shadow
></eox-storytelling>
</main>
<esa-footer
title="Want to get notified?"
description="EarthCODE is coming soon. If you want to get notified about the public launch, do not hesitate to contact us about our newsletter."
></esa-footer>
<esa-cookies
link="https://www.esa.int/Services/Cookies_notice"
style="display: none"
></esa-cookies>
</div>
<script
src="https://unpkg.com/@eox/[email protected]/components/header.js"
src="https://unpkg.com/@eox/[email protected]/components/header.js"
type="module"
></script>
<script
src="https://unpkg.com/@eox/[email protected]/components/navbar.js"
type="module"
></script>
<script
src="https://unpkg.com/@eox/[email protected]/components/footer.js"
type="module"
></script>
<script
src="https://unpkg.com/@eox/esa-ui@1.0.1/components/navbar.js"
src="https://unpkg.com/@eox/esa-ui@1.2.1/components/menu.js"
type="module"
></script>
<script
src="https://unpkg.com/@eox/esa-ui@1.0.1/components/footer.js"
src="https://unpkg.com/@eox/esa-ui@1.2.1/components/cover.js"
type="module"
></script>
<script
src="https://unpkg.com/@eox/esa-ui@1.0.1/components/menu.js"
src="https://unpkg.com/@eox/esa-ui@1.2.1/components/main-section.js"
type="module"
></script>
<script
src="https://unpkg.com/@eox/esa-ui@1.0.1/components/cover.js"
src="https://unpkg.com/@eox/esa-ui@1.2.1/components/cookies.js"
type="module"
></script>
<script
src="https://unpkg.com/@eox/[email protected]/components/main-section.js"
src="https://unpkg.com/@eox/[email protected]"
type="module"
></script>
<link
rel="stylesheet"
href="https://unpkg.com/@eox/[email protected]/css/main.css"
/>
<script>
const menuItems = [
{
href: "/",
title: "Portal",
},
{
href: "/catalog/",
href: "https://opensciencedata.esa.int/",
title: "Science Catalog",
},
{
href: "/community/",
title: "Community",
},
{
href: "/integrated-platform-services/",
title: "Integrated Platform Services",
},
{
href: "/documentation/",
title: "Documentation",
},
];
const footerItems = [
[
Expand All @@ -131,10 +140,6 @@
href: "https://www.esa.int/About_Us/Corporate_news",
title: "About ESA",
},
{
href: "https://www.esa.int/esashop",
title: "ESA Space Shop",
},
],
[
{
Expand All @@ -156,6 +161,46 @@
document.querySelector("esa-navbar").menuItems = menuItems;
document.querySelector("esa-menu").menuItems = menuItems;
document.querySelector("esa-footer").footerItems = footerItems;
document.querySelector("esa-cookies").addEventListener("accept", () => {
_paq.push(["rememberCookieConsentGiven"]);
});
document.querySelector("esa-cookies").addEventListener("decline", () => {
_paq.push(["forgetCookieConsentGiven"]);
_paq.push(["optUserOut"]);
});

if (
!document.cookie.includes("mtm_cookie_consent") &&
!document.cookie.includes("mtm_consent_removed")
) {
document.querySelector("esa-cookies").style.display = "block";
}

// TRACK PAGE SCROLL
function getScrollPercent() {
const h = document.documentElement,
b = document.body,
st = "scrollTop",
sh = "scrollHeight";
return ((h[st] || b[st]) / ((h[sh] || b[sh]) - h.clientHeight)) * 100;
}
const scrollTargets = {
25: false,
50: false,
75: false,
100: false,
};
document.addEventListener("scroll", (e) => {
Object.keys(scrollTargets).forEach((target) => {
if (
getScrollPercent() >= parseInt(target) &&
!scrollTargets[target]
) {
scrollTargets[target] = true;
_paq.push(["trackEvent", "Scroll_depth", `${target}%`]);
}
});
});
</script>
</body>
</html>
43 changes: 43 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## EarthCODE Portal <!--{as="esa-main-section"}-->
This portal shall provide an entry point to the collaborative
development tools and resources, as well as access to community
guidelines and open documentation to help researchers adopt FAIR
principles in their scientific practice.

Through community and capacity building focused on Open Science, the
activity shall promote a trusted collaborative experience of
conducting Earth system science.

## <!--{as="div" style="display: flex; width: 100%; justify-content: center"}-->
![Landing page image](earthcode.png) <!--{style="width: 100%; max-width: 50vw"}-->

## <!--{as="esa-main-section"}-->
For all components (technology, community, partnerships), the
Reproducible Open Science Environment can rely on elements developed
as part of other FutureEO activities and on readily available
operational services provided by Member States’ public and industrial
facilities, including interoperable building blocks, platform
services, Open Science capacity building, scientific communication,
and international cooperation.

## I want to publish my scientific findings, how can EarthCODE help? <!--{as="esa-main-section"}-->
After signup, you will be able to access your workspace and create
your first experiment. If your input data, workflow file and resulting
product(s) are located on supported platforms, you can combine them
and add some additional project metadata. After publishing your
experiment, EarhCODE will copy and securly store the data for you and
generate an unique DOI.

## I would like to check if somebody did similar research to the one I am conducting, can I use EarthCODE for that? <!--{as="esa-main-section"}-->
EarthCODE will let you browse projects, experiments and resulting
products created by the entire community. You will be able to search
by title, keywords, publication date and other
metadata.

## I found an interesting experiment, how can I re-run it with my own parameters? <!--{as="esa-main-section"}-->
Each experiment published on EarthCODE will be reproducible (to
varying degrees). If you choose to reproduce a previous experiment,
all the available information (e.g. input data, source code, required
environment) will be pre-loaded, allowing you to either re-run the
experiment with the same parameters, or changing them to build your
own experiment upon it.

0 comments on commit 9e19ecd

Please sign in to comment.