Skip to content

Commit

Permalink
Merge pull request #67 from concord-consortium/new-webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
pjanik authored Jul 6, 2023
2 parents 02e404b + 935b07c commit 1f10426
Show file tree
Hide file tree
Showing 12 changed files with 20,810 additions and 3,785 deletions.
46 changes: 26 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ jobs:
name: Build and Run Jest Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Dependencies
run: npm ci
run: npm ci --legacy-peer-deps
- name: Build
run: npm run build
- name: Run Tests
Expand All @@ -19,34 +21,38 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- uses: cypress-io/github-action@v2
uses: actions/checkout@v3
- uses: cypress-io/github-action@v5
with:
install-command: npm ci --legacy-peer-deps
browser: chrome
headless: true
start: npm start
wait-on: 'http://localhost:8080'
s3-deploy:
s3-deploy2:
name: S3 Deploy
needs:
- build_test
- cypress
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Setup Ruby 2.4
uses: actions/setup-ruby@v1
- uses: actions/setup-node@v3
with:
ruby-version: '2.4'
node-version: 16
- name: Install Dependencies
run: |
gem install s3_website -v 3.4.0
npm ci
- name: Build
run: npm run build
- name: Deploy
run: ./s3_deploy.sh
run: npm ci --legacy-peer-deps
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# skip installing cypress since it isn't needed for just building
# This decreases the deploy time quite a bit
CYPRESS_INSTALL_BINARY: 0
- uses: concord-consortium/s3-deploy-action@v1
with:
build: npm run build-production
bucket: models-resources
prefix: seismic-explorer
awsAccessKeyId: ${{ secrets.AWS_ACCESS_KEY_ID }}
awsSecretAccessKey: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# Parameters to GHActions have to be strings, so a regular yaml array cannot
# be used. Instead the `|` turns the following lines into a string
topBranches: |
["master"]
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release
on:
workflow_dispatch:
inputs:
version:
description: The git tag for the version to use for index.html
required: true
env:
BUCKET: models-resources
PREFIX: seismic-explorer
SRC_FILE: index-top.html
DEST_FILE: index.html
jobs:
release:
runs-on: ubuntu-latest
steps:
- run: >
aws s3 cp
s3://${{ env.BUCKET }}/${{ env.PREFIX }}/version/${{ github.event.inputs.version }}/${{ env.SRC_FILE }}
s3://${{ env.BUCKET }}/${{ env.PREFIX }}/${{ env.DEST_FILE }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
1 change: 1 addition & 0 deletions js/3d/camera.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as THREE from 'three'
import 'three/examples/js/controls/OrbitControls'
import TWEEN from 'tween.js'
import { BOX_DEPTH } from './cross-section-box'
import TweenManager from '../tween-manager'
Expand Down
1 change: 0 additions & 1 deletion js/3d/cross-section-view.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as THREE from 'three'
import 'three/examples/js/controls/OrbitControls'
import Earthquake from './earthquake'
import Volcano from './volcano'
import Eruption from './eruption'
Expand Down
1 change: 0 additions & 1 deletion js/3d/top-view.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as THREE from 'three'
import 'three/examples/js/controls/OrbitControls'
import Earthquake from './earthquake'
import Volcano from './volcano'
import Eruption from './eruption'
Expand Down
4 changes: 2 additions & 2 deletions public/index.html → js/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<link rel="manifest" href="site.webmanifest">
<link rel="mask-icon" href="safari-pinned-tab.svg" color="#5bbad5">
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" rel="stylesheet">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<!--end of favicon metadata -->
Expand All @@ -32,6 +33,5 @@
</head>
<body>
<div id="app"></div>
<script src="app.js"></script>
</body>
</html>
1 change: 0 additions & 1 deletion js/plate-movement/plate-movement-view.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as THREE from 'three'
import 'three/examples/js/controls/OrbitControls'
import DirectionArrows from './direction-arrows'
import Camera from './camera'
import getThreeJSRenderer from '../get-threejs-renderer'
Expand Down
Loading

0 comments on commit 1f10426

Please sign in to comment.