rate limiting (#11) #13
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
name: Prod deploy | |
on: | |
push: | |
branches: ["master"] | |
jobs: | |
aws_cdk_deploy: | |
name: CDK Prod Deployment | |
if: github.event_name == 'push' | |
environment: production | |
runs-on: ubuntu-latest | |
env: | |
PROD_DATABASE_URL: ${{ secrets.PROD_DATABASE_URL }} | |
ENV: prod | |
SQS_QUEUE_URL: ${{ secrets.PROD_SQS_QUEUE_URL }} | |
RESEND_API_KEY: ${{ secrets.PROD_RESEND_API_KEY }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "npm" | |
cache-dependency-path: ./package-lock.json | |
- name: Install dependencies | |
run: npm install --legacy-peer-deps | |
- name: Install AWS CDK | |
run: npm i -g aws-cdk | |
- name: Configure aws credentials | |
uses: aws-actions/configure-aws-credentials@master | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} | |
aws-region: "eu-west-2" | |
- name: Synth Prod stack | |
run: cdk synth prod-env/dev-feed-stack | |
- name: Deploy Dev stack | |
run: cdk deploy prod-env/dev-feed-stack --require-approval never | |
vercel_prod_deploy: | |
name: Vercel Prod Deployment | |
runs-on: ubuntu-latest | |
needs: [aws_cdk_deploy] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Vercel CLI | |
run: npm install --global vercel@latest | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build Project Artifacts | |
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy Project Artifacts to Vercel | |
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} |