[pull] main from tldraw:main #646
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: Deploy bemo | |
# TODO: add some sort of production trigger | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- bemo-production | |
env: | |
CI: 1 | |
PRINT_GITHUB_ANNOTATIONS: 1 | |
TLDRAW_ENV: ${{ (github.ref == 'refs/heads/bemo-production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
deploy: | |
name: Deploy bemo to ${{ (github.ref == 'refs/heads/bemo-production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
environment: ${{ github.ref == 'refs/heads/bemo-production' && 'bemo-production' || 'bemo-canary' }} | |
concurrency: bemo-${{ github.ref == 'refs/heads/bemo-production' && 'bemo-production' || github.ref }} | |
steps: | |
# - name: Notify initial start | |
# uses: MineBartekSA/discord-webhook@v2 | |
# if: github.ref == 'refs/heads/bemo-production' | |
# with: | |
# webhook: ${{ secrets.DISCORD_DEPLOY_WEBHOOK_URL }} | |
# content: 'Preparing ${{ env.TLDRAW_ENV }} bemo deploy: ${{ github.event.head_commit.message }} by ${{ github.event.head_commit.author.name }}' | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: ./.github/actions/setup | |
- name: Build types | |
run: yarn build-types | |
- name: Deploy | |
run: yarn tsx internal/scripts/deploy-bemo.ts | |
env: | |
RELEASE_COMMIT_HASH: ${{ github.sha }} | |
GH_TOKEN: ${{ github.token }} | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
DISCORD_DEPLOY_WEBHOOK_URL: ${{ secrets.DISCORD_DEPLOY_WEBHOOK_URL }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_BEMO_WORKER_DSN: ${{ secrets.SENTRY_BEMO_WORKER_DSN }} |