Skip to content

Commit

Permalink
Fix NOAA and EMIT (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
slesaad authored Dec 5, 2024
2 parents 74fe3ae + 2556329 commit bddf902
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/deploy-emit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ jobs:
echo PUBLIC_URL="${{ vars.PUBLIC_URL_EMIT }}" >> .env
echo MAP_STYLE="${{ vars.MAP_STYLE }}" >> .env
echo MAP_ACCESS_TOKEN="${{ secrets.MAP_ACCESS_TOKEN }}" >> .env
echo PUBLIC_URL="${{ vars.PUBLIC_URL_EMIT }}" >> .env
echo STAGE="production" >> .env
npm install
npm run deploy
Expand Down Expand Up @@ -116,9 +115,7 @@ jobs:

- name: Upload to S3
run: |
export PUBLIC_URL=$(echo ${{ vars.PUBLIC_URL_EMIT }} | sed -E 's|^https?://[^/]+/||')
echo "PUBLIC_URL=${PUBLIC_URL}" >> $GITHUB_ENV
aws s3 sync "./emit-ch4plume-v1/dist" s3://${{ vars.DEPLOYMENT_BUCKET }}${PUBLIC_URL}/ --cache-control max-age=30,must-revalidate,s-maxage=604800 --delete
aws s3 sync "./emit-ch4plume-v1/dist" s3://${{ vars.DEPLOYMENT_BUCKET }}${{ vars.PUBLIC_URL_EMIT }}/ --cache-control max-age=30,must-revalidate,s-maxage=604800 --delete
- name: Request Invalidation to AWS Cloudfront
uses: oneyedev/aws-cloudfront-invalidation@v1
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/deploy-noaa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,8 @@ jobs:

- name: Upload to S3
run: |
export PUBLIC_URL=$(echo ${{ vars.PUBLIC_URL_NOAA }} | sed -E 's|^https?://[^/]+/||')
echo "PUBLIC_URL=${PUBLIC_URL}" >> $GITHUB_ENV
aws s3 sync "./noaa-cpfp-point/dist" s3://${{ vars.DEPLOYMENT_BUCKET }}${PUBLIC_URL}/ --cache-control max-age=30,must-revalidate,s-maxage=604800 --delete
aws s3 sync "./noaa-cpfp-point/data" s3://${{ vars.DEPLOYMENT_BUCKET }}${PUBLIC_URL}/data/ --cache-control max-age=30,must-revalidate,s-maxage=604800 --delete
aws s3 sync "./noaa-cpfp-point/dist" s3://${{ vars.DEPLOYMENT_BUCKET }}${{ vars.PUBLIC_URL_NOAA }}/ --cache-control max-age=30,must-revalidate,s-maxage=604800 --delete
aws s3 sync "./noaa-cpfp-point/data" s3://${{ vars.DEPLOYMENT_BUCKET }}${{ vars.PUBLIC_URL_NOAA }}/data/ --cache-control max-age=30,must-revalidate,s-maxage=604800 --delete
env:
PUBLIC_URL: ${{ vars.PUBLIC_URL_NOAA }}

Expand Down
2 changes: 1 addition & 1 deletion emit-ch4plume-v1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ <h1 class="toolbar-heading"> EMIT Methane Plume Viewer </h1>
</div>

<!--
need to remove
Need to remove
<div class="toggle-container">
<span class="custom-label"> Animate</span>
<label class="toggle-switch">
Expand Down
2 changes: 1 addition & 1 deletion noaa-cpfp-point/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-annotation/1.0.2/chartjs-plugin-annotation.min.js"></script>
<!-- For dev -->
<!-- <script type="module" src="./script.js"></script> -->
<!-- For prod here-->
<!-- For prod -->
<script type="module" src="<%= htmlWebpackPlugin.options.publicUrl %>/script.js"></script>
</body>
</html>

0 comments on commit bddf902

Please sign in to comment.