Skip to content

Commit

Permalink
refactor(ci): new ci-cd proposal POC
Browse files Browse the repository at this point in the history
  • Loading branch information
csantiago132 committed Oct 22, 2024
1 parent 6bb5493 commit f16ab53
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 20 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/branch.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: CI/CD Dev Branch

on:
push:
branches:
- dev

jobs:
deploy:
uses: kurocado-studio/styleguide/.github/workflows/composite.deploy.yml@main
secrets: inherit
22 changes: 2 additions & 20 deletions .github/workflows/ci.yml → .github/workflows/branch.main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ permissions:
pull-requests: write

on:
pull_request:
push:
branches:
- main
- dev

jobs:
lint:
Expand All @@ -32,24 +30,8 @@ jobs:
needs: document
uses: kurocado-studio/styleguide/.github/workflows/composite.release.yml@main
secrets: inherit
if: |
github.event_name == 'push' &&
github.ref == 'refs/heads/main'

deploy:
needs: release
name: Deploy app
runs-on: ubuntu-latest
concurrency: deploy-group
if: |
github.event_name == 'push' &&
(
github.ref == 'refs/heads/main' ||
github.ref == 'refs/heads/dev'
)
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
uses: kurocado-studio/styleguide/.github/workflows/composite.deploy.yml@main
secrets: inherit
14 changes: 14 additions & 0 deletions .github/workflows/branch.pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: CI/CD Pull Request

on:
pull_request:

jobs:
lint:
uses: kurocado-studio/styleguide/.github/workflows/composite.lint.yml@main
secrets: inherit

test:
needs: lint
uses: kurocado-studio/styleguide/.github/workflows/composite.test.yml@main
secrets: inherit

0 comments on commit f16ab53

Please sign in to comment.