Skip to content

Ensure systemd service is enabled (#54) #63

Ensure systemd service is enabled (#54)

Ensure systemd service is enabled (#54) #63

Workflow file for this run

name: deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
env:
DD_API_KEY: ${{ secrets.DD_API_KEY }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.12
- name: Generate AWS profile
run: |
mkdir ~/.aws
cat >> ~/.aws/credentials << EOF
[transitmatters]
aws_access_key_id = ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key = ${{ secrets.AWS_SECRET_ACCESS_KEY }}
EOF
cat >> ./devops/local.json << EOF
{
"mbta": {
"v3_api_key": "${{ secrets.MBTA_V3_API_KEY }}"
},
"DATADOG_TRACE_ENABLED": true
}
EOF
- name: Write SSH key
run: |
mkdir ~/.ssh
cat >> ~/.ssh/transitmatters-gobble.pem << EOF
${{ secrets.SSH_PRIVATE_KEY }}
EOF
chmod 0600 ~/.ssh/transitmatters-gobble.pem
- name: Run deploy shell script
run: |
curl -sSL https://install.python-poetry.org | python3 -
cd devops && bash ./deploy.sh -p -c