Skip to content

Commit 2ce491e

Browse files
committed
Apply styling correctly and better CI handling
1 parent 5a9be8f commit 2ce491e

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.github/workflows/actions.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ jobs:
1212
node-version: 'lts/*'
1313
- uses: actions/checkout@v4
1414
- run: npm install
15-
- run: cp -r node_modules/@openeo/vue-components/assets ./
15+
- run: |-
16+
mkdir dist
17+
cp -r node_modules/@openeo/vue-components/assets ./dist
18+
cp index.html ./dist
1619
- uses: peaceiris/actions-gh-pages@v4
1720
with:
1821
github_token: ${{ secrets.GITHUB_TOKEN }}
19-
publish_dir: ./
22+
publish_dir: dist
2023
user_name: 'moreGeo CI'
2124
user_email: ci@moregeo.it

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/node_modules/
2+
/assets/

index.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@
3333
const stacUrl = url.hash.substring(1);
3434
const component = document.getElementById('stac');
3535
component.setAttribute('url', stacUrl);
36-
const css = document.getElementById("styles").cloneNode(true);
37-
component.shadowRoot.appendChild(css);
36+
const intervalId = window.setInterval(() => {
37+
if (!component.shadowRoot) return;
38+
const css = document.getElementById("styles").cloneNode(true);
39+
component.shadowRoot.appendChild(css);
40+
window.clearInterval(intervalId);
41+
}, 100);
3842
</script>
3943
</body>
4044
</html>

0 commit comments

Comments
 (0)