Skip to content

Commit

Permalink
[FIX] Fix deploy workflow (#412)
Browse files Browse the repository at this point in the history
* [FIX] Fix deploy workflow

Appzi and plausible script were not correctly inserted

* [FIX] error fixes

- correct WF invocation of sed
- remove dangling appzi scripts in index.html
  • Loading branch information
surchs authored Dec 19, 2024
1 parent 56decdf commit cd50615
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ jobs:
# TODO: Make this cleaner by for example using a custom hook and adding to document
- name: Add prod scripts
run: |
add_script='
<script async src="https://w.appzi.io/w.js?token=YVTHd"></script>
<script defer data-domain="query.neurobagel.org" src="https://plausible.neurobagel.org/js/script.js"></script>
'
sed -i "s|<!-- Additional script tags -->|${add_script}|" index.html
add_script='<script async src="https://w.appzi.io/w.js?token=YVTHd"></script><script defer data-domain="query.neurobagel.org" src="https://plausible.neurobagel.org/js/script.js"></script>'
# Need to use single quotes around sed to avoid ! to be interpreted as a history expansion character
sed -i 's|<!-- Additional script tags -->|'"${add_script}"'|' index.html
- name: Set up Node
uses: actions/setup-node@v4
Expand Down
11 changes: 0 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,3 @@
<!-- Additional script tags -->
</body>
</html>

<!-- Appzi-->
<script async src="https://w.appzi.io/w.js?token=YVTHd"></script>
<!-- End Appzi -->
<!-- Begin Plausibe -->
<script
defer
data-domain="query.neurobagel.org"
src="https://plausible.neurobagel.org/js/script.js"
></script>
<!-- End Plausibe -->

0 comments on commit cd50615

Please sign in to comment.