Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Remove old sites

Remove old sites #9454

Workflow file for this run

# cspell:words akhileshns
name: CI
on:
push:
branches: [main]
pull_request:
schedule:
- cron: '0 9 * * 1-5'
env:
TF_VERSION: 1.5.4
jobs:
test:
runs-on: ubuntu-20.04
timeout-minutes: 10
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: 'password'
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@main
- uses: nanasess/setup-chromedriver@master
- uses: ruby/setup-ruby@master
with:
bundler-cache: true
- uses: actions/setup-node@main
with:
cache: yarn
node-version-file: .nvmrc
- run: ./bin/setup
- run: RAILS_ENV=test ./bin/rails assets:precompile
- run: ./bin/test
- run: ./bin/quality
- name: Run git diff
run: if [[ $(git status --porcelain) != '' ]]; then git status; git diff; exit 1; fi
spellcheck:
runs-on: ubuntu-20.04
timeout-minutes: 1
steps:
- uses: actions/checkout@main
- uses: streetsidesoftware/cspell-action@main
with:
files: '**'
incremental_files_only: false
terraform:
runs-on: ubuntu-20.04
timeout-minutes: 1
defaults:
run:
working-directory: terraform/app_environment
steps:
- uses: actions/checkout@main
- uses: hashicorp/setup-terraform@main
with:
terraform_version: ${{ env.TF_VERSION }}
terraform_wrapper: false
- run: terraform fmt -check -recursive
- run: terraform init -backend=false
- run: terraform validate
- name: Run git diff
run: if [[ $(git status --porcelain) != '' ]]; then git status; git diff; exit 1; fi
deployTerraform:
needs: [test, spellcheck, terraform]
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-20.04
concurrency: serial
timeout-minutes: 10
defaults:
run:
working-directory: terraform/app_environment
env:
TF_WORKSPACE: production
steps:
- uses: actions/checkout@main
- uses: hashicorp/setup-terraform@main
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
terraform_version: ${{ env.TF_VERSION }}
terraform_wrapper: false
- run: terraform init
- run: terraform apply -lock-timeout=30s
- name: Run git diff
run: if [[ $(git status --porcelain) != '' ]]; then git status; git diff; exit 1; fi
deployHeroku:
needs: [deployTerraform]
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-20.04
concurrency: serial
timeout-minutes: 10
steps:
- uses: actions/checkout@main
- uses: akhileshns/heroku-deploy@master
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: ${{ secrets.HEROKU_APP_NAME }}-production
heroku_email: ${{ secrets.HEROKU_EMAIL }}
- name: Run git diff
run: if [[ $(git status --porcelain) != '' ]]; then git status; git diff; exit 1; fi