Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
santilland authored Apr 16, 2024
0 parents commit ccaef34
Show file tree
Hide file tree
Showing 8 changed files with 133 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build_main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This is a basic workflow takes care of building and deploying
# catalog when pushing to main branch

# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-22.04
permissions:
contents: write
pages: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: |
pip install -U pip
pip install eodash_catalog
- name: Build
env:
SH_INSTANCE_ID: ${{ secrets.SH_INSTANCE_ID }}
SH_CLIENT_ID: ${{ secrets.SH_CLIENT_ID }}
SH_CLIENT_SECRET: ${{ secrets.SH_CLIENT_SECRET }}
run: eodash_catalog
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
force_orphan: true


1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 eodash

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# catalog-template
Template for creating eodash catalog repository

## How-to
You can create a new repository using the "use this template" button.
This will set-up a catalog repository for you with example configuration files as well as a github workflow that will automatically build and deploy the STAC catalog to the gh-page branch.
For every commit you push to the main branch the catalog will be regenerated and deployed there.

Please consider! This deployment strategy is intended for reasonable sized catalogs, if a catalog gets larger a more robust strategy should be implemented, changing the current github action, for example deploying the build to an s3 bucket.

To make the build catalog available through github pages, please go to:
* repository settings
- Pages (left side panel)
- Source: "Deploy from branch" (should be selected)
- Branch: Select "gh-pages" from dropdown
- (leave root selected)
- Click on save

Once enabled you can navigate to the catalog using:

https://\<organization\>.github.io/\<repository\>/\<catalog_name\>/catalog.json
9 changes: 9 additions & 0 deletions catalogs/template_catalog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
id: "template_catalog"
title: "Template Catalog"
description: "This catalog definition is part of the eodash catalog template, please update to fit your needs"
endpoint: "https://organization.github.io/repository/repository/"
default_base_layers: "layers/baselayers"
default_overlay_layers: "layers/overlays"
assets_endpoint: "https://raw.githubusercontent.com/organization/assets-repo/main/"
collections:
- example_collection
23 changes: 23 additions & 0 deletions collections/example_collection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Name: example_collection
Title: Example Collection
EodashIdentifier: EX1
Description: This can be **markdown** or a reference to a markdown file
Themes:
- example
Tags:
- example tag
DataSource:
Spaceborne:
Satellite:
- Satellitename
Sensor:
- Sensorname
InSitu:
- Other insitu data
Agency:
- Example agency
Resources:
- EndPoint: https://tiles.maps.eox.at/wms?
Name: WMS
LayerId: terrain-light_3857
MediaType: image/png
7 changes: 7 additions & 0 deletions layers/baselayers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- id: cloudless-2021
name: EOxCloudless 2021
url: '//s2maps-tiles.eu/wmts/1.0.0/s2cloudless-2021_3857/default/g/{z}/{y}/{x}.jpeg'
media_type: image/jpeg
attribution: '{ EOxCloudless 2021: <a xmlns:dct="http://purl.org/dc/terms/" href="//s2maps.eu" target="_blank" property="dct:title">Sentinel-2 cloudless - s2maps.eu</a> by <a xmlns:cc="http://creativecommons.org/ns#" href="//eox.at" target="_blank" property="cc:attributionName" rel="cc:attributionURL">EOX IT Services GmbH</a> (Contains modified Copernicus Sentinel data 2021) }'
maxNativeZoom: 17
protocol: 'xyz'
7 changes: 7 additions & 0 deletions layers/overlays.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- id: overlay_bright
name: 'Overlay labels'
url: '//s2maps-tiles.eu/wmts/1.0.0/overlay_base_bright_3857/default/g/{z}/{y}/{x}.png'
attribution: '{ Overlay: Data &copy; <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors, Made with Natural Earth, Rendering &copy; <a href="//eox.at" target="_blank">EOX</a> }'
visible: true
maxNativeZoom: 14
protocol: 'xyz'

0 comments on commit ccaef34

Please sign in to comment.