Skip to content

Some changes and stuff #78

Some changes and stuff

Some changes and stuff #78

Workflow file for this run

name: Deploy all services
on:
push:
branches:
- main
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: ./.github/commands/yarn_install
- run: yarn workspace @rv-app/schema generate
# Setup AWS Credentials
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
# Install Pulumi and deploy the infra code
- uses: pulumi/[email protected]
- run: yarn workspace @rv-app/infra exec pulumi up --stack dev --yes --refresh
# Set the env vars that the frontend needs
- run: |
rm frontend/.env
echo "RV_APP_USER_POOL_ID=$(yarn workspace @rv-app/infra exec pulumi stack output userPoolId --stack dev)" >> frontend/.env
echo "RV_APP_AWS_REGION=$(yarn workspace @rv-app/infra exec pulumi stack output region --stack dev)" >> frontend/.env
echo "RV_APP_COGNITO_CLIENT_ID=$(yarn workspace @rv-app/infra exec pulumi stack output clientId --stack dev)" >> frontend/.env
echo "RV_APP_IDENTITY_POOL_ID=$(yarn workspace @rv-app/infra exec pulumi stack output identityPoolId --stack dev)" >> frontend/.env
echo "RV_APP_API_ENDPOINT=$(yarn workspace @rv-app/infra exec pulumi stack output endpoint --stack dev)" >> frontend/.env
cat frontend/.env
# Build and deploy the frontend code
- run: yarn workspace @rv-app/frontend build
- run: aws s3 sync frontend/dist s3://rv-app-origin-bucket --delete