Skip to content

Commit

Permalink
deploy action restored
Browse files Browse the repository at this point in the history
  • Loading branch information
goodeats committed May 22, 2024
1 parent 70cdbe7 commit 8fc2f98
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 45 deletions.
88 changes: 43 additions & 45 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,48 +136,46 @@ jobs:
path: playwright-report/
retention-days: 30

# uncomment when I feel that fly deploy is stable enough
# deploy:
# name: 🚀 Deploy
# runs-on: ubuntu-22.04
# needs: [lint, typecheck, vitest, playwright]
# # only build/deploy main branch on pushes
# if:
# ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') &&
# github.event_name == 'push' }}

# steps:
# - name: ⬇️ Checkout repo
# uses: actions/checkout@v3

# - name: 👀 Read app name
# uses: SebRollen/[email protected]
# id: app_name
# with:
# file: 'fly.toml'
# field: 'app'

# # move Dockerfile to root
# - name: 🚚 Move Dockerfile
# run: |
# mv ./other/Dockerfile ./Dockerfile
# mv ./other/.dockerignore ./.dockerignore

# - name: 🎈 Setup Fly
# uses: superfly/flyctl-actions/[email protected]

# - name: 🚀 Deploy Staging
# if: ${{ github.ref == 'refs/heads/dev' }}
# run:
# flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }}
# --app ${{ steps.app_name.outputs.value }}-staging
# env:
# FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

# - name: 🚀 Deploy Production
# if: ${{ github.ref == 'refs/heads/main' }}
# run:
# flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }}
# --build-secret SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
# env:
# FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
uncomment when I feel that fly deploy is stable enough
deploy:
name: 🚀 Deploy
runs-on: ubuntu-22.04
needs: [lint, typecheck, vitest, playwright]
# only build/deploy main branch on pushes
if: ${{ github.event_name == 'push' }}

steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: 👀 Read app name
uses: SebRollen/[email protected]
id: app_name
with:
file: 'fly.toml'
field: 'app'

# move Dockerfile to root
- name: 🚚 Move Dockerfile
run: |
mv ./other/Dockerfile ./Dockerfile
mv ./other/.dockerignore ./.dockerignore
- name: 🎈 Setup Fly
uses: superfly/flyctl-actions/[email protected]

- name: 🚀 Deploy Staging
if: ${{ github.ref == 'refs/heads/dev' }}
run:
flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }}
--app ${{ steps.app_name.outputs.value }}-staging
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

- name: 🚀 Deploy Production
if: ${{ github.ref == 'refs/heads/main' }}
run:
flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }}
--build-secret SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
1 change: 1 addition & 0 deletions fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ primary_region = "bos"
kill_signal = "SIGINT"
kill_timeout = 5
processes = [ ]
swap_size_mb = 512

[experimental]
allowed_public_ports = [ ]
Expand Down

0 comments on commit 8fc2f98

Please sign in to comment.