Skip to content

Commit

Permalink
Merge branch 'develop' into remove-redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
robkooper authored Jul 14, 2024
2 parents e4c9877 + 359ff10 commit d388ed0
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 116 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,3 @@ jobs:
mkdir -p spec/tmp
bundle exec rails test
bundle exec rspec --tag ~js
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build image
run: docker build --tag image --file Dockerfile .
84 changes: 84 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Docker

on:
push:
branches:
- main
- master
- develop
tags:
- "v*.*.*"
pull_request:

jobs:
docker:
runs-on: ubuntu-latest
permissions:
packages: write

steps:
- uses: actions/checkout@v4

# create metadata for image
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
pecan/bety
ghcr.io/${{ github.repository_owner }}/bety
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
# setup docker build
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Inspect Builder
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
# login to registries
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# build the docker images
- name: Build and push docker image
uses: docker/build-push-action@v5
with:
context: .
#push: ${{ github.event_name != 'pull_request' }}
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BETY_GIT_TAGS=${{ steps.meta.outputs.version }}
BETY_GIT_BRANCH=${{ github.ref_name }}
BETY_GIT_CHECKSUM=${{ github.sha }}
BETY_GIT_DATE=${{ github.event.head_commit.timestamp }}
73 changes: 0 additions & 73 deletions .github/workflows/release.yml

This file was deleted.

3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ ENV LOCAL_SERVER=99 \
PGDATABASE=postgres \
BETYUSER=bety \
BETYPASSWORD=bety \
BETYDATABASE=bety
BETYDATABASE=bety \
GOOGLE_ANALYTICS_ID=G-0000000000

# Install dependencies
RUN apt-get update \
Expand Down
19 changes: 8 additions & 11 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,15 @@
<%#= stylesheet_link_tag 'themes/default' %>
<%#= stylesheet_link_tag 'themes/alphacube' %>

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-30952394-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
<!-- Google Analytics (G4) tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= CONFIG[:google_analytics_id] %>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', '<%= CONFIG[:google_analytics_id] %>');
</script>

<!-- Maintain the order of the following CSS until we can gut the "scaffold" CSS -->
<!-- Old CSS -->
<%#= stylesheet_link_tag "scaffold" %>
Expand Down
23 changes: 8 additions & 15 deletions app/views/layouts/fullscreen.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,16 @@
<% end %>

<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, width=device-width, maximum-scale=1.0, user-scalable=no" />
<!-- Google Analytics (GA5) tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= CONFIG[:google_analytics_id] %>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=true"></script>
<% end %>

<meta name="verify-v1" content="T7Z0mdC+KbUOu+J0CJ6oBySKYz1WUJQJLH0BOtUn1QA=" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-30952394-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

gtag('config', '<%= CONFIG[:google_analytics_id] %>');
</script>

</head>
<body style="height:100%">
<%= yield %>
Expand Down
4 changes: 3 additions & 1 deletion config/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ site_identification_markup: "<strong>PEcAn</strong>db <small><strong>The PEcAn</


# Footer

footer_background_image_file: "https://energybiosciencesinstitute.org/wp-content/themes/ebi/assets/logo.png"

# google analyitics
google_analytics_id: <%= ENV["GOOGLE_ANALYTICS_ID"] || 'G-0000000000' %>

## Contact Information
admin_phone: "(000) 000-0000"
admin_email: "[email protected]" # a test
Expand Down
8 changes: 3 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3"

services:
# BETY rails frontend to the database
bety:
Expand All @@ -11,15 +9,16 @@ services:
environment:
- UNICORN_WORKER_PROCESSES=1
- SECRET_KEY_BASE=thisisnotasecret
- GOOGLE_ANALYTICS_ID=G-0000000000
depends_on:
- postgres
restart: unless-stopped

# postgresql + postgis to hold all the data
postgres:
image: postgis/postgis:12-3.3
env:
POSTGRES_PASSWORD: bety
environment:
POSTGRES_PASSWORD: postgres
networks:
- bety
#ports:
Expand All @@ -33,4 +32,3 @@ networks:

volumes:
postgres:

11 changes: 8 additions & 3 deletions public/UI_redesign/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -456,10 +456,15 @@ <h3><strong>Translate</strong> Page</h3>
});
</script>

<!-- http://mths.be/aab -->

<!-- Google Anaytics (GA4) tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-2PN4PE3MT2"></script>
<script>
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']]; // Change UA-XXXXX-X to be your site's ID
//(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script'));
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-2PN4PE3MT2');
</script>

<script>
Expand Down

0 comments on commit d388ed0

Please sign in to comment.