Skip to content

Commit

Permalink
Merge pull request #1 from Carifio24/updates
Browse files Browse the repository at this point in the history
Configuration updates and workflows
  • Loading branch information
Carifio24 authored Jan 23, 2024
2 parents df6c0d5 + 78d9ae1 commit d09239a
Show file tree
Hide file tree
Showing 8 changed files with 5,686 additions and 20 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build and Deploy

on:
push:
branches:
main

jobs:
build:
if: ${{ github.repository_owner == 'cosmicds' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.17.1'

- name: Yarn install
run: yarn install

- name: Lint
run: yarn lint

- name: Build
run: yarn build

# - name: BrowserStack env setup
# uses: browserstack/github-actions/setup-env@master
# with:
# username: ${{ secrets.BROWSERSTACK_USERNAME }}
# access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}

# - name: BrowserStack local tunnel setup
# uses: browserstack/github-actions/setup-local@master
# with:
# local-testing: start
# local-identifier: random

# - name: Run BrowserStack tests
# run: |
# set -xeuo pipefail
# yarn serve &
# sleep 10
# yarn test-bslocal -e default,firefox,edge,safari -o reports

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: dist
ssh-key: ${{ secrets.DEPLOY_KEY }}
56 changes: 56 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build

on:
pull_request_target:
branches:
main

permissions: read-all

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.17.1'

- name: Yarn install
run: yarn install

- name: Lint
run: yarn lint

- name: Build
run: yarn build

# - name: BrowserStack env setup
# uses: browserstack/github-actions/setup-env@master
# with:
# username: ${{ secrets.BROWSERSTACK_USERNAME }}
# access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}

# - name: 'BrowserStack local tunnel setup'
# uses: browserstack/github-actions/setup-local@master
# with:
# local-testing: start
# local-identifier: random

# - name: Run BrowserStack tests
# run: |
# set -xeuo pipefail
# yarn serve &
# sleep 10
# yarn test-bslocal -e default,firefox,edge,safari -o reports

# - name: 'BrowserStackLocal Stop' # Terminating the BrowserStackLocal tunnel connection
# uses: browserstack/github-actions/setup-local@master
# with:
# local-testing: stop
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{
"version": "0.0.0",
"dependencies": {
"@cosmicds/vue-toolkit": "^0.1.3",
"@fortawesome/fontawesome-svg-core": "^6.4.2",
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"@fortawesome/vue-fontawesome": "^3.0.3",
"@minids/common": "workspace:0.0.0",
"vue": "3.3.4",
"@wwtelescope/engine": "^7.29.3",
"@wwtelescope/engine-helpers": "^0.16.0",
"@wwtelescope/engine-pinia": "^0.9.0",
"vue": "^3",
"vuetify": "^3.3.23",
"webpack-plugin-vuetify": "^2.0.1"
"webpack-plugin-vuetify": "^2.0.0"
},
"scripts": {
"build": "vue-cli-service build",
Expand All @@ -31,5 +34,5 @@
"typescript": "^5.2.2",
"webpack": "^5.89.0"
},
"name": "@minids/jwst-brick"
"name": "@cosmicds/jwst-brick"
}
10 changes: 5 additions & 5 deletions src/CreditLogos.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<div id="logo-credits">
<div id="icons-container">
<a href="https://www.cosmicds.cfa.harvard.edu/" target="_blank" rel="noopener noreferrer"
><img alt="CosmicDS Logo" :src="require('../../assets/cosmicds_logo_for_dark_backgrounds.png')"
><img alt="CosmicDS Logo" src="https://cosmicds.github.io/cds-website/logos/cosmicds_logo_for_dark_backgrounds.png"
/></a>
<a href="https://worldwidetelescope.org/home/" target="_blank" rel="noopener noreferrer"
><img alt="WWT Logo" src="../../assets/logo_wwt.png"
><img alt="WWT Logo" src="https://cosmicds.github.io/cds-website/logos/logo_wwt.png"
/></a>
<a href="https://science.nasa.gov/learners" target="_blank" rel="noopener noreferrer" class="pl-1"
><img alt="SciAct Logo" src="../../assets/logo_sciact.png"
><img alt="SciAct Logo" src="https://cosmicds.github.io/cds-website/logos/logo_sciact.png"
/></a>
<a href="https://nasa.gov/" target="_blank" rel="noopener noreferrer" class="pl-1"
><img alt="SciAct Logo" src="../../assets/NASA_Partner_color_300_no_outline.png"
><img alt="SciAct Logo" src="https://cosmicds.github.io/cds-website/logos/NASA_Partner_color_300_no_outline.png"
/></a>
</div>
</div>
Expand Down Expand Up @@ -53,4 +53,4 @@ export default defineComponent({
watch: {
}
});
</script>
</script>
16 changes: 8 additions & 8 deletions src/JwstBrick.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,16 @@
<div id="project-credits">
<div id="icons-container">
<a href="https://www.cosmicds.cfa.harvard.edu/" target="_blank" rel="noopener noreferrer"
><img alt="CosmicDS Logo" src="../../assets/cosmicds_logo_for_dark_backgrounds.png"
><img alt="CosmicDS Logo" src="https://cosmicds.github.io/cds-website/logos/cosmicds_logo_for_dark_backgrounds.png"
/></a>
<a href="https://worldwidetelescope.org/home/" target="_blank" rel="noopener noreferrer"
><img alt="WWT Logo" src="../../assets/logo_wwt.png"
><img alt="WWT Logo" src="https://cosmicds.github.io/cds-website/logos/logo_wwt.png"
/></a>
<a href="https://science.nasa.gov/learners" target="_blank" rel="noopener noreferrer" class="pl-1"
><img alt="SciAct Logo" src="../../assets/logo_sciact.png"
><img alt="SciAct Logo" src="https://cosmicds.github.io/cds-website/logos/logo_sciact.png"
/></a>
<a href="https://nasa.gov/" target="_blank" rel="noopener noreferrer" class="pl-1"
><img alt="SciAct Logo" src="../../assets/NASA_Partner_color_300_no_outline.png"
><img alt="SciAct Logo" src="https://cosmicds.github.io/cds-website/logos/NASA_Partner_color_300_no_outline.png"
/></a>
</div>
</div>
Expand Down Expand Up @@ -378,7 +378,7 @@
import { ImageSetLayer, Place, Settings } from "@wwtelescope/engine";
import { applyImageSetLayerSetting } from "@wwtelescope/engine-helpers";
import { defineComponent, PropType } from "vue";
import { MiniDSBase, BackgroundImageset, skyBackgroundImagesets } from "@minids/common";
import { MiniDSBase, BackgroundImageset, skyBackgroundImagesets } from "@cosmicds/vue-toolkit";
import { GotoRADecZoomParams } from "@wwtelescope/engine-pinia";
type ToolType = "crossfade" | "choose-background" | null;
Expand Down Expand Up @@ -814,7 +814,7 @@ export default defineComponent({
<style lang="less">
@font-face {
font-family: "Highway Gothic Narrow";
src: url("../../assets/HighwayGothicNarrow.ttf");
src: url("https://cosmicds.github.io/cds-website/fonts/HighwayGothicNarrow.ttf");
}
:root {
Expand Down Expand Up @@ -916,7 +916,7 @@ body {
align-items: center;
justify-content: center;
.spinner {
background-image: url("../../assets/lunar_loader.gif");
background-image: url("https://cosmicds.github.io/cds-website/logos/lunar_loader.gif");
background-repeat: no-repeat;
background-size: contain;
width: 3rem;
Expand All @@ -941,7 +941,7 @@ body {
div {
margin: 0;
padding: 0;
background-image: url("../../assets/wwt_globe_bg.png");
background-image: url("https://cosmicds.github.io/cds-website/logos/wwt_globe_bg.png");
background-repeat: no-repeat;
background-size: contain;
background-position: center;
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Vue, { createApp } from "vue";

import { FundingAcknowledgment, IconButton } from "@minids/common";
import { FundingAcknowledgment, IconButton } from "@cosmicds/vue-toolkit";
import JwstBrick from "./JwstBrick.vue";
import CreditLogos from "./CreditLogos.vue";
import PlacesGallery from "./PlacesGallery.vue";
Expand Down
15 changes: 13 additions & 2 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
const { VuetifyPlugin } = require('webpack-plugin-vuetify');
const { defineConfig } = require("@vue/cli-service")
const webpack = require("webpack");
const path = require("path");

module.exports = defineConfig({
publicPath: "./",

configureWebpack: {
plugins: [
new VuetifyPlugin()
]
new VuetifyPlugin(),
new webpack.DefinePlugin({
// https://github.com/vuejs/vue-cli/pull/7443
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'false',
})
],
resolve: {
alias: {
vue: path.resolve("./node_modules/vue")
}
}
},

// Needed for BrowserStack/Safari testing as of 2023 March. This makes the
Expand Down
Loading

0 comments on commit d09239a

Please sign in to comment.