Skip to content

Commit

Permalink
chore(deploy-api.yaml): rename deploy-api-prod.yaml to deploy-api.yaml
Browse files Browse the repository at this point in the history
feat(deploy-api.yaml): change trigger from push to release event
feat(deploy-api.yaml): add support for deploying preview environment
feat(deploy-api.yaml): add support for deploying production environment only for non-prerelease releases
  • Loading branch information
chronark committed Jul 5, 2023
1 parent 41991e3 commit 7977062
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 88 deletions.
81 changes: 0 additions & 81 deletions .github/workflows/deploy-api-prod.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Deploy API Preview
on:
push:
branches: ['main']
tags: ['^v\d+\.\d+\.\d+-canary\.\d+$']
name: Deploy API

on:
release:
types:
- published

concurrency: deploy.preview
concurrency: deploy

jobs:

Expand Down Expand Up @@ -75,8 +75,15 @@ jobs:
- name: Download image
run: docker pull ${{env.TAG}}

- name: Deploy
- name: Deploy preview
run: /home/runner/.fly/bin/flyctl --app="unkey-api-preview" deploy --image=${{ env.TAG }}
working-directory: apps/api
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

- name: Deploy prod
if: "!github.event.release.prerelease"
run: /home/runner/.fly/bin/flyctl --app="unkey-api-production" deploy --image=${{ env.TAG }}
working-directory: apps/api
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

1 comment on commit 7977062

@vercel
Copy link

@vercel vercel bot commented on 7977062 Jul 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

unkey – ./

unkey-unkey.vercel.app
unkey.vercel.app
unkey-git-main-unkey.vercel.app
unkey.dev
www.unkey.dev

Please sign in to comment.