Skip to content

Commit

Permalink
chore(embed): deploy code embed renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
tericcabrel committed Sep 3, 2022
1 parent 906e5f8 commit 82ea8c9
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/deploy-code-embed.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
name: Sharingan Deploy Code Embed
on:
workflow_dispatch:
inputs:
stage:
default: Production
options:
- Production
- Development
description: "Environment to deploy on"
required: true
pull_request:
branches:
- main
push:
branches:
- main
- dev
paths:
- 'packages/database/prisma/**'
- 'packages/database/src/**'
Expand All @@ -21,7 +16,7 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.stage }}
environment: ${{ (github.ref == 'refs/heads/main' && 'Production') || 'Development' }}
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
EMBED_STYLE_URL: ${{ secrets.EMBED_STYLE_URL }}
Expand All @@ -41,14 +36,14 @@ jobs:

- name: Deploy the application in staging
working-directory: 'apps/functions/code-embed'
if: ${{ github.event.inputs.stage == 'Development' }}
if: ${{ github.ref == 'refs/heads/dev' }}
run: |
yarn setup:layer:remote
yarn sls deploy --stage dev
- name: Deploy the application in production
working-directory: 'apps/functions/code-embed'
if: ${{ github.event.inputs.stage == 'Production' }}
if: ${{ github.ref == 'refs/heads/main' }}
run: |
yarn setup:layer:remote
yarn sls deploy --stage prod
Expand Down

0 comments on commit 82ea8c9

Please sign in to comment.