Release - develop #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
workflow_run: | |
workflows: ['Code quality'] | |
branches: ['develop'] | |
types: | |
- completed | |
permissions: | |
id-token: write | |
contents: read | |
name: Release - develop | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
environment: Develop | |
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: 'develop' | |
- 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: 'dev' | |
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 |