diff --git a/.github/workflows/branch.dev.yml b/.github/workflows/branch.dev.yml new file mode 100644 index 0000000..6a60011 --- /dev/null +++ b/.github/workflows/branch.dev.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/branch.main.yml similarity index 55% rename from .github/workflows/ci.yml rename to .github/workflows/branch.main.yml index f8b05d1..5b52696 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/branch.main.yml @@ -7,11 +7,9 @@ permissions: pull-requests: write on: - pull_request: push: branches: - main - - dev jobs: lint: @@ -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 diff --git a/.github/workflows/branch.pr.yml b/.github/workflows/branch.pr.yml new file mode 100644 index 0000000..d4e8d55 --- /dev/null +++ b/.github/workflows/branch.pr.yml @@ -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