Skip to content

Commit

Permalink
Added fly github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasfr committed Jun 6, 2024
1 parent b42bcaf commit 6a8458c
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/fly-review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 🧨 Deploy PR Review

concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
types: [opened, reopened, synchronize, closed]

env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
FLY_REGION: fra
FLY_ORG: forge-42

jobs:
deploy_pr_review:
name: Deploy PR Review
runs-on: ubuntu-latest

outputs:
url: ${{ steps.deploy.outputs.url }}

environment:
name: pr-review
url: ${{ steps.deploy.outputs.url }}

steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master

- name: Deploy PR app to Fly.io
id: deploy
uses: superfly/[email protected]
with:
name: f42-website-pr${{ github.event.number }}
29 changes: 29 additions & 0 deletions .github/workflows/fly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 🔥 Deploy to Production

concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
- main

env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
FLY_REGION: fra
FLY_ORG: forge-42

jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest

environment:
name: production
url: https://forge42.dev

steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only

0 comments on commit 6a8458c

Please sign in to comment.