Skip to content

Commit

Permalink
Fix service de recherche
Browse files Browse the repository at this point in the history
  • Loading branch information
lowzonenose committed Oct 29, 2024
1 parent 703dd2f commit 2c6d318
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:
# - package.zip
# - modules.zip
# - bundle.zip
build:
build: # Only for tags !
if: github.event_name == 'push' && contains(github.ref, '/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -52,7 +53,7 @@ jobs:
- name: Create Zip Package
run: |
zip --junk-paths ${{env.PACKAGE_NAME}} dist/${{env.PACKAGE_NAME}}/*
zip --junk-paths ${{env.PACKAGE_NAME}} dist/${{env.PACKAGE_NAME}}/* -x "dist/package/*.tgz"
- name: Upload JSDoc artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -87,9 +88,10 @@ jobs:
# - checkout gh-pages
# - download des artifacts : build & jsdoc
# - commit & push
# info : on ne realise pas le "deploy" à ce niveau,
# le commit du "changelog" sur main déclenche le deploy du build.yaml
deploy:
# warning: ceci risque de declencher un deploy automatique !
# > CUSTOMISER LE DEPLOY ET METTRE UNE CONDITION D'EXECUTION !
deploy: # Only for tags !
if: github.event_name == 'push' && contains(github.ref, '/tags/')
needs: build
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -120,7 +122,7 @@ jobs:
git config user.name github-actions
git config user.email [email protected]
git add -A
git commit -m "build project gh-pages"
git commit -m "[github-actions] deploy project gh-pages"
git push
# - checkout master or main
Expand Down
20 changes: 16 additions & 4 deletions src/packages/Services/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,17 @@ const suggest = async (text) => {
// "metadata_urls": [],
// "srs": [
// "EPSG:2154"
// ]
// ],
// "attribution": {
// "title": "Ministère de la Transition écologique et de la Cohésion des territoires",
// "url": "https://www.ecologie.gouv.fr/",
// "logo": {
// "format": "image/png",
// "url": "https://data.geopf.fr/annexes/ressources/logos/mtect.png",
// "width": 294,
// "height": 171
// }
// }
// }
// }
// ]
Expand All @@ -133,9 +143,11 @@ const suggest = async (text) => {
// FIXME champs possibles mais pas toujours remplis :
// srs[], attributions{}, extent{}, metada_url[]
var o = {
originators : result.source.attributions,
srs : result.source.srs,
metadata : result.source.metadata_url,
originators : result.source.attribution || {},
srs : result.source.srs || [],
keywords : result.source.keywords || [],
extent : result.source.extent || {},
metadata : result.source.metadata_urls || [],
name : result.source.layer_name,
title : result.source.title,
description : result.source.description,
Expand Down

0 comments on commit 2c6d318

Please sign in to comment.