Skip to content
Open

V4 #41

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7c88321
Adding v4 and elastic search
jayvarner Jan 14, 2026
0fcc531
Update Rails to version 8.
jayvarner Jan 16, 2026
d67da7c
Rails 8!
jayvarner Mar 17, 2026
9d6ff7a
Update Ruby version in test workflow and remove CircleCI config.
jayvarner Mar 17, 2026
3ca4b22
Set arch for GitHub workflow
jayvarner Mar 17, 2026
8b778ab
Add key to workflow
jayvarner Mar 17, 2026
e5c145e
Put key in correct place
jayvarner Mar 17, 2026
1f9802e
Add elasticsearch and yaml to workflow
jayvarner Mar 17, 2026
bdb7814
Add dependencies to workflow
jayvarner Mar 17, 2026
6ba0fa6
Use Chromium in GH Action
jayvarner Mar 17, 2026
5641b4a
Adjust how unpublished are returned
jayvarner Mar 17, 2026
b9ca29e
Add chrome to docker build
jayvarner May 19, 2026
a85d899
Improve test suite and format with Rubocop
jayvarner Jun 5, 2026
c855d65
More Rubocop cleanup
jayvarner Jun 5, 2026
34d6336
Fix indexed link for map overlays
jayvarner Jun 12, 2026
b3745ce
Make http_path a function
jayvarner Jun 12, 2026
18c9c8d
Rubocop fixes
jayvarner Jun 24, 2026
42c5136
Add published_on to tours
jayvarner Jun 24, 2026
5232176
Fix auth engine migrations
jayvarner Jun 24, 2026
f877940
Spec improvements
jayvarner Jun 26, 2026
ca06836
Improve and expand embed support
jayvarner Jul 1, 2026
a8caeea
Restore video props parser
jayvarner Jul 1, 2026
4e60c34
Pre-cleanup
jayvarner Jul 21, 2026
000fd6f
CRUD improvements
jayvarner Jul 21, 2026
1cedd26
Support renaming sites
jayvarner Jul 21, 2026
0baecb9
Add voice over support
jayvarner Aug 14, 2026
c4c95b6
TourAuthor management for v4
jayvarner Aug 14, 2026
08fb9f5
Update workflows
jayvarner Aug 14, 2026
f9be30b
Bump ES in workflow
jayvarner Aug 14, 2026
48eb5b1
More work on authorizations, time estimates, and open geographies
jayvarner Sep 3, 2026
a1713b4
Rework Open Geographies parsing
jayvarner Sep 3, 2026
7335588
Improve OG deserialization
jayvarner Sep 3, 2026
d37561a
Support mode update, improve duration estimates, avoid remaking all v…
jayvarner Sep 24, 2026
7d5b1f5
Add icon color to tours
jayvarner Oct 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
93 changes: 0 additions & 93 deletions .circleci/config.yml

This file was deleted.

159 changes: 75 additions & 84 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ name: Deploy

on:
push:
branches: [ develop, main ]
branches: [develop, main]
workflow_dispatch:
inputs:
environment:
description: 'Environment to deploy to'
description: "Environment to deploy to"
required: true
default: 'staging'
default: "staging"
type: choice
options:
- staging
- production
- staging
- production

env:
RAILS_ENV: production
Expand All @@ -22,91 +22,82 @@ permissions:
contents: read

jobs:
# Runs the exact same job defined in test.yml (via workflow_call) instead
# of keeping a separate copy here. deploy only runs if this passes.
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:13
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: otb_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.2
bundler-cache: true

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y postgresql-client imagemagick libpq-dev gdal-bin libgdal-dev

- name: Create directories
run: |
sudo mkdir -p /data/tmp
sudo chmod 777 /data/tmp
mkdir -p public/storage/tmp

- name: Set up database
run: |
export DB_ADAPTER=postgresql
until pg_isready -h localhost -p 5432 -U postgres; do sleep 2; done
bundle exec rake db:create RAILS_ENV=test DB_ADAPTER=postgresql
bundle exec rake db:schema:load RAILS_ENV=test DB_ADAPTER=postgresql

- name: Run tests
run: |
DB_ADAPTER=postgresql bundle exec rspec --format progress
uses: ./.github/workflows/test.yml
secrets: inherit

deploy:
needs: test
runs-on: ubuntu-latest

# For a manual run, the picker below decides. For an ordinary push,
# there's no picker input, so this falls back to branch: main ->
# production, anything else (develop) -> staging.
environment: ${{ github.event.inputs.environment || (github.ref_name == 'main' && 'production' || 'staging') }}

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: us-east-1
role-session-name: GitHub-OIDC-OTB
# A manual dispatch could otherwise pick "production" while running
# against a non-main branch, silently deploying untested branch code
# to production. This only ever fires for that specific case — a
# normal push always resolves its environment from the branch itself,
# never from this input, so it can't trip this guard.
- name: Refuse to deploy production from a non-main branch
if: github.event.inputs.environment == 'production' && github.ref_name != 'main'
run: |
echo "::error::Refusing to deploy to production from branch '${{ github.ref_name }}'. Production deploys must be triggered from main."
exit 1

- name: Deploy to ECS
env:
AWS_ECR: ${{ secrets.AWS_ECR }}
AWS_ECS_CLUSTER_DEV: ${{ secrets.AWS_ECS_CLUSTER_DEV }}
AWS_ECS_CLUSTER_PROD: ${{ secrets.AWS_ECS_CLUSTER_PROD }}
AWS_ECS_SERVICE_DEV: ${{ secrets.AWS_ECS_SERVICE_DEV }}
AWS_ECS_SERVICE_PROD: ${{ secrets.AWS_ECS_SERVICE_PROD }}
AWS_REGION: ${{ secrets.AWS_REGION }}
BRANCH: ${{ github.ref_name }}
run: |
chmod +x build.sh
./build.sh
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: us-east-1
role-session-name: GitHub-OIDC-OTB

# Turns the resolved environment (production/staging) into the actual
# image tag + ECS cluster/service build.sh needs. This is the one
# place that mapping lives now — build.sh just builds/pushes/deploys
# whatever it's told, it doesn't decide anything on its own anymore.
- name: Resolve deploy target
id: target
env:
DEPLOY_ENV: ${{ github.event.inputs.environment || (github.ref_name == 'main' && 'production' || 'staging') }}
run: |
if [ "$DEPLOY_ENV" = "production" ]; then
{
echo "tag=stable"
echo "cluster=${{ secrets.AWS_ECS_CLUSTER_PROD }}"
echo "service=${{ secrets.AWS_ECS_SERVICE_PROD }}"
} >> "$GITHUB_OUTPUT"
else
{
echo "tag=latest"
echo "cluster=${{ secrets.AWS_ECS_CLUSTER_DEV }}"
echo "service=${{ secrets.AWS_ECS_SERVICE_DEV }}"
} >> "$GITHUB_OUTPUT"
fi

- name: Notify deployment status
if: always()
run: |
branch="${{ github.ref_name }}"
environment=$([ "$branch" == "main" ] && echo "production" || echo "staging")
if [[ "${{ job.status }}" == "success" ]]; then
echo "Successfully deployed to $environment via ECS"
else
echo "Deployment to $environment failed"
fi
- name: Build, tag, push, and deploy
env:
AWS_ECR: ${{ secrets.AWS_ECR }}
TAG: ${{ steps.target.outputs.tag }}
AWS_ECS_CLUSTER: ${{ steps.target.outputs.cluster }}
AWS_ECS_SERVICE: ${{ steps.target.outputs.service }}
run: |
chmod +x build.sh
./build.sh

- name: Notify deployment status
if: always()
env:
DEPLOY_ENV: ${{ github.event.inputs.environment || (github.ref_name == 'main' && 'production' || 'staging') }}
run: |
if [ "${{ job.status }}" = "success" ]; then
echo "Successfully deployed to $DEPLOY_ENV via ECS"
else
echo "Deployment to $DEPLOY_ENV failed"
fi
Loading
Loading