Skip to content

Commit

Permalink
add links paths + workflow fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
baloola committed Jun 29, 2023
1 parent 38da0f4 commit e2ccee4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ jobs:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
python3 ./stac/stac-generator/stac-generator.py
stac copy -t ABSOLUTE_PUBLISHED --publish-location "https://fairicube.github.io/data-requests" stac_dist/catalog.json out
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: './stac/'
path: './out'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
4 changes: 3 additions & 1 deletion stac/stac-generator/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
pystac
gql
shapely
shapely
stactools
requests-toolbelt
11 changes: 8 additions & 3 deletions stac/stac-generator/stac-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,12 @@ def insert_value(field, value_list, listed_fields, doc):

issues = client.execute(query_1)[
"organization"]["repository"]["issues"]["edges"]
index_catalog = pystac.Catalog.from_file(os.path.join('./stac', 'index.json'))
index_catalog = pystac.Catalog(
id="index",
title="data-access catalog",
description="The stac catalog that contains all the generated datacube items."
)

for index, issue in enumerate(issues):
title = issue["node"]["title"].split("]: ")[-1].replace(" ", "_")
issue_type = re.findall(r'\[(.*?)\]', issue["node"]["title"])
Expand Down Expand Up @@ -245,5 +250,5 @@ def insert_value(field, value_list, listed_fields, doc):
index_catalog.add_item(stac_item)

index_catalog.normalize_and_save(
root_href="https://fairicube.github.io/data-requests/stac/",
catalog_type=pystac.CatalogType.ABSOLUTE_PUBLISHED)
root_href="stac_dist/",
catalog_type=pystac.CatalogType.SELF_CONTAINED)

0 comments on commit e2ccee4

Please sign in to comment.