Skip to content

Commit

Permalink
Merge pull request #25 from pietrzakacper/deploy-on-merge
Browse files Browse the repository at this point in the history
Deploy on merge to main
  • Loading branch information
pietrzakacper authored Sep 4, 2024
2 parents 155b2ac + 7f2466f commit 4737307
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy-to-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy main to Fly

on:
push:
branches: [main]

env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

jobs:
e2e-tests:
uses: ./.github/workflows/e2e-tests.yml

unit-and-integration-tests:
uses: ./.github/workflows/unit-tests.yml

deploy:
name: Deploy to Fly
needs: [e2e-tests, unit-and-integration-tests]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup flyctl
uses: superfly/flyctl-actions/setup-flyctl@master

- uses: oven-sh/setup-bun@v2

- run: cd reporters/javascript && bun install && bun run build && cd ../..

- run: cd frontend && bun install && VITE_SERVER_URL=/ bun run build && cd ../..

- name: Deploy
run: flyctl deploy --env IP_INFO_TOKEN=${{ secrets.IP_INFO_TOKEN }}
5 changes: 2 additions & 3 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: E2E tests

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_call:

jobs:
build-and-run:
e2e-tests:
runs-on: ubuntu-latest

steps:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Unit & Integration tests

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_call:

jobs:
bun-tests:
Expand Down

0 comments on commit 4737307

Please sign in to comment.