This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
feat: ✨ changed error response to success flag (#134) #71
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
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json | |
--- | |
name: Deploy CloudFormation stacks and production environment | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
id-token: write | |
contents: read | |
deployments: write | |
pull-requests: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
ACCOUNT_ID: ${{ secrets.ACCOUNT_ID }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_REGION: us-east-1 | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
CERTIFICATE_ARN: ${{ secrets.CERTIFICATE_ARN }} | |
DATABASE_URL: ${{ secrets.DATABASE_URL_PRODUCTION }} | |
DATABASE_URL_WEBSOC_SCRAPER: ${{ secrets.DATABASE_URL_WEBSOC_SCRAPER }} | |
HOSTED_ZONE_ID: ${{ secrets.HOSTED_ZONE_ID }} | |
NODE_ENV: production | |
jobs: | |
deploy-api: | |
name: Deploy API CloudFormation stack and production environment | |
runs-on: ubuntu-latest | |
environment: | |
name: production | |
url: https://api-next.peterportal.org | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Setup Node.js and pnpm | |
uses: ./.github/actions/setup-node-and-pnpm | |
- name: Install dependencies | |
run: pnpm install -P false --frozen-lockfile | |
- name: Build API | |
run: pnpm build --filter="@apps/api" | |
- name: Deploy API CloudFormation stack | |
run: pnpm --filter="@apps/api" cdk-app deploy | |
deploy-documentation: | |
name: Deploy documentation CloudFormation stack and production environment | |
runs-on: ubuntu-latest | |
environment: | |
name: production-docs | |
url: https://docs.api-next.peterportal.org | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Setup Node.js and pnpm | |
uses: ./.github/actions/setup-node-and-pnpm | |
- name: Install dependencies | |
run: pnpm install -P false --frozen-lockfile | |
- name: Build documentation | |
run: pnpm build --filter="@apps/docs" | |
- name: Deploy documentation CloudFormation stack | |
run: pnpm --filter="@tools/cdk" docs deploy | |
deploy-services: | |
name: Deploy services CloudFormation stack and production environment | |
runs-on: ubuntu-latest | |
environment: | |
name: production-services | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Setup Node.js and pnpm | |
uses: ./.github/actions/setup-node-and-pnpm | |
- name: Install dependencies | |
run: pnpm install -P false --frozen-lockfile | |
- name: Build services | |
run: pnpm build --filter="@services/*" | |
- name: Deploy stack | |
run: pnpm --filter="@tools/cdk" services deploy |