Skip to content

Release - production #56

Release - production

Release - production #56

Workflow file for this run

on:
workflow_run:
workflows: ['Code quality']
branches: ['master']
types:
- completed
permissions:
id-token: write
contents: read
name: Release - production
jobs:
build-and-deploy:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
environment: Production
steps:
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::265358888522:role/github-deployment
role-session-name: github-main-deployment
aws-region: eu-west-1
- uses: actions/checkout@v4
with:
ref: 'master'
- uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install dependencies
run: npm ci && cd src/api/http && npm ci && cd .. && cd websocket && npm ci
- name: Build
run: npm run build
env:
VITE_APP_NAME: 'Activity timer'
VITE_APP_KEY: ${{ secrets.ACT_APP_KEY }}
VITE_API_HOST: ${{ secrets.ACT_API_HOST }}
VITE_WEBSOCKET: ${{ secrets.ACT_WEBSOCKET }}
VITE_POWERUP_ID: ${{ secrets.ACT_POWERUP_ID }}
VITE_SENTRY_DSN: ${{ secrets.ACT_SENTRY_DSN }}
VITE_APP_ORIGIN: ${{ secrets.ACT_APP_ORIGIN }}
VITE_MAILCHIMP_LINK: ${{ secrets.ACT_MAILCHIMP_LINK }}
- name: cdk deploy
env:
ACT_ENV: 'prod'
AWS_DEFAULT_REGION: 'eu-west-1'
TRELLO_SECRET: ${{ secrets.ACT_TRELLO_SECRET }}
run: cd infrastructure && npm ci && npx cdk bootstrap && npx cdk deploy --require-approval never