Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy on merge to main #25

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading