Skip to content

Deploy to Amplify Prod #2

Deploy to Amplify Prod

Deploy to Amplify Prod #2

Workflow file for this run

name: "Deploy Serverless PROD"
on:
workflow_dispatch:
inputs:
ref:
description: "The branch, tag or SHA to checkout"
type: string
required: true
default: "master"
env:
NODE_VERSION: "18.X"
AWS_REGION: "us-east-1"
jobs:
deploy:
name: "Development deployment"
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
steps:
- name: "Checkout to deployment ref"
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ env.AWS_REGION }}
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
role-duration-seconds: 1200 # Set the session duration as needed
role-session-name: RestakingDashboardGithubAction
- name: "Setup Node.js"
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION}}
- name: "Install yarn globally"
run: npm install --global yarn
- name: "Install dependencies"
working-directory: ./api
run: yarn install
- name: "Deploy serverless"
working-directory: "./api"
run: npx serverless deploy --conceal --region ${{ env.AWS_REGION }} --stage prod
env:
SPICE_AI_API_KEY: ${{ secrets.SPICE_AI_API_KEY }}
CORS_ORIGIN_WHITELIST: ${{ secrets.CORS_ORIGIN_WHITELIST_PROD }}