Skip to content

Move monthly rapid data processing into mbta-performance repo (#981) #566

Move monthly rapid data processing into mbta-performance repo (#981)

Move monthly rapid data processing into mbta-performance repo (#981) #566

Workflow file for this run

name: deploy
on:
workflow_dispatch:
push:
branches:
- main
- dashboard-v4
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20']
python-version: ['3.12']
env:
AWS_PROFILE: transitmatters
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TM_FRONTEND_CERT_ARN: ${{ secrets.TM_FRONTEND_CERT_ARN }}
TM_LABS_WILDCARD_CERT_ARN: ${{ secrets.TM_LABS_WILDCARD_CERT_ARN }}
MBTA_V3_API_KEY: ${{ secrets.MBTA_V3_API_KEY }}
DD_API_KEY: ${{ secrets.DD_API_KEY }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Set up Node ${{ matrix.node-version }}.x
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Set up CI Cache
uses: actions/cache@v3
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Check if package-lock.json is up to date
run: |
npx --yes [email protected]
- name: Generate AWS profile
run: |
mkdir ~/.aws
cat >> ~/.aws/credentials << EOF
[$AWS_PROFILE]
aws_access_key_id = $AWS_ACCESS_KEY_ID
aws_secret_access_key = $AWS_SECRET_ACCESS_KEY
EOF
- name: Run deploy shell script
run: |
curl -sSL https://install.python-poetry.org | python3 -
npm ci
bash deploy.sh -p -c